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

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