import { createSlice } from "@reduxjs/toolkit";
import { slaughterExtraReducer } from "./slaughterExtraReducer";

const initialState = {
  pending: false,
  modalState: false,
  slaughterGetRequests: null,
  slaughterGetActiveRequests: null,
  slaughterHouseCars: null,
  slaughterHouseComplaints: null,
  slaughterHouseRegisteredComplaints: null,
  profile: null,
  inventorySelectedKillHouse: null,
};

const slice = createSlice({
  name: "slaughter",
  initialState,
  extraReducers: slaughterExtraReducer,
  reducers: {
    setInventorySelectedKillHouse: (state, action) => {
      state.inventorySelectedKillHouse = action.payload;
    },
  },
});

export const { setInventorySelectedKillHouse } = slice.actions;
export const { reducer: slaughterSlice } = slice;
