import { createTableComponent } from '../Factory/createTableComponent';
import {
  fetch,
  update,
  deleteItem,
  setRefetch,
  deleteItemsByIds,
} from '../../stores/project_memberships/project_membershipsSlice';
import { loadColumns } from './configureProject_membershipsCols';
import type { ProjectMembership } from '../../types/entities';

const TableProject_memberships = createTableComponent<ProjectMembership>({
  entityName: 'project_memberships',
  sliceSelector: (state) => state.project_memberships,
  fetchAction: fetch,
  updateAction: update,
  deleteAction: deleteItem,
  deleteByIdsAction: deleteItemsByIds,
  setRefetchAction: setRefetch,
  loadColumnsFunction: loadColumns,
});

export default TableProject_memberships;
