import { inspectorGetKillHousesService } from "../../../features/inspector/services/inspector-get-kill-houses";
import { inspectorGetProfile } from "../../../features/inspector/services/inspector-get-profile";
import { inspectorGetNewRequests } from "../../../features/inspector/services/inspector-new-requests";
import { manageFarmGetFarmsService } from "../../../features/inspector/services/manage-farm-get-farms";

export const inspectorExtraReducers = {
  [inspectorGetNewRequests.fulfilled]: (state, { payload }) => {
    state.inspectorNewRequests = payload.data;
    state.pending = false;
  },
  [inspectorGetNewRequests.pending]: (state) => {
    state.pending = true;
  },
  [inspectorGetProfile.fulfilled]: (state, { payload }) => {
    state.profile = payload.data;
    state.pending = false;
  },
  [manageFarmGetFarmsService.fulfilled]: (state, { payload }) => {
    state.manageFarmGetFarms = payload.data;
  },
  [inspectorGetKillHousesService.fulfilled]: (state, { payload }) => {
    state.inspectorGetKillHouses = payload.data;
  },
};
