/**
 * Projects Redux Slice
 */

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

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

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

export default reducer;
