import { Component, FC, ReactNode } from "react"; export type EntityData = { [key: string]: string | object; } & { id?: string | never; }; type HeaderData = { [K in keyof D as D[K] extends string | ReactNode ? K : never]: D[K]; }; export type DataTableHeader = { header: string; key: Extract, string | ReactNode>; }; type FilterOption = { id: string; label: string; }; type DataTableFilter = { title: string; options: FilterOption[]; callback: (entry: D, selectedFilters: FilterOption[]) => boolean; }; type TextMenuItem = { label: string; onClick: (entity: D) => void; isDangerous?: boolean; disabled?: boolean; }; type MenuItem = TextMenuItem & { icon?: Component; }; type DefaultEntityListProps = { title: string; isInsideModal?: false; }; type ModalEntityListProps = { title?: string; isInsideModal: true; }; type EntityListProps = (DefaultEntityListProps | ModalEntityListProps) & { description?: ReactNode | string; documentationPath?: string; data: D[] | null; headers: DataTableHeader[]; filter?: DataTableFilter; addEntityLabel?: string | null; addEntityDisabled?: boolean; onAddEntity?: () => void; onEntityClick?: (element: D) => void; onSearch?: (value: string) => void; menuItems?: [MenuItem] | [MenuItem, MenuItem] | [TextMenuItem, TextMenuItem, TextMenuItem]; sortProperty?: keyof D; loading?: boolean; batchSelection?: { onSelect: (selected: D) => unknown; onUnselect: (selected: D) => unknown; onSelectAll: (selected: D[]) => unknown; isSelected: (selected: D) => boolean; }; }; declare const EntityList: ({ title, isInsideModal, description, documentationPath, headers, filter, data, addEntityLabel, addEntityDisabled, onAddEntity, onEntityClick, onSearch, menuItems, sortProperty, loading, batchSelection, }: EntityListProps) => ReturnType; export default EntityList;