import { ticketGetCreatedTickets } from "../../../features/ticket/services/ticket-get-created-tickets";
import { ticketGetOperatorTickets } from "../../../features/ticket/services/ticket-get-operator-tickets";

export const ticketExtraReducers = {
  [ticketGetCreatedTickets.fulfilled]: (state, { payload }) => {
    state.tickets = payload.data;
    state.pending = false;
  },
  [ticketGetCreatedTickets.pending]: (state) => {
    state.pending = true;
  },
  [ticketGetOperatorTickets.fulfilled]: (state, { payload }) => {
    state.operatorTickets = payload.data;
    state.pending = false;
  },
  [ticketGetOperatorTickets.pending]: (state) => {
    state.pending = true;
  },
};
