/**
 * Permissions Redux Slice
 */

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

const { slice, actions, reducer } = createEntitySlice<PermissionEntity>({
  name: 'permissions',
  endpoint: 'permissions',
  singularName: 'Permission',
});

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

export default reducer;
