/**
 * Page Elements Redux Slice
 */

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

const { slice, actions, reducer } = createEntitySlice<PageElement>({
  name: 'page_elements',
  endpoint: 'page_elements',
  singularName: 'Page Element',
});

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

export default reducer;
