/**
 * Roles List Page
 */

import { createListPage } from '../../factories/createListPage';
import TableRoles from '../../components/Roles/TableRoles';
import { uploadCsv, setRefetch } from '../../stores/roles/rolesSlice';

const filters = [
  { label: 'Name', title: 'name' },
  { label: 'Permissions', title: 'permissions' },
];

export default createListPage({
  entityName: 'roles',
  entityTitle: 'Roles',
  TableComponent: TableRoles,
  filters,
  readPermission: 'READ_ROLES',
  createPermission: 'CREATE_ROLES',
  uploadCsvAction: uploadCsv,
  setRefetchAction: setRefetch,
});
