// redux/slices/database/priorityConfigSlice.js
import { fetchPriorityConfigThunk } from "../../thunks/database/fetchPriorityConfigThunk";

import { createSlice } from "@reduxjs/toolkit";
const slice = createSlice({
  name: "priorityConfig",
  initialState: { data: [], status: "idle" },
  extraReducers: (builder) => {
    builder.addCase(fetchPriorityConfigThunk.fulfilled, (state, action) => {
      state.status = "succeeded";
      state.data = action.payload;
    });
  },
});
export default slice.reducer;
export const selectPriorityConfig = (state) => state.priorityConfig.data;
