/**
 * Assets Redux Slice
 */

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

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

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

export default reducer;
