// /redux/thunks/fetchSystemSettingsThunk.ts
import { createAsyncThunk } from "@reduxjs/toolkit";
import { fetchSystemSettings } from "../../services/fetchSystemSettings";
import { setSystemSettings } from "../slices/systemSettingsSlice";

export const fetchSystemSettingsThunk = createAsyncThunk(
  "systemSettings/fetch",
  async (_, { dispatch }) => {
    const data = await fetchSystemSettings();
    if (data) dispatch(setSystemSettings(data));
  }
);
