/**
 * Users Redux Slice
 */

import { createEntitySlice } from '../createEntitySlice';
import type { User } from '../../types/entities';

const { slice, actions, reducer } = createEntitySlice<User>({
  name: 'users',
  endpoint: 'users',
  singularName: 'User',
});

export const {
  fetch,
  create,
  update,
  deleteItem,
  deleteItemsByIds,
  uploadCsv,
  setRefetch,
} = actions;
export const usersSlice = slice;

export default reducer;
