import {RefObject} from "react";
import {BaseTableRef} from "../components/BaseTable/BaseTable.tsx";
import {MRT_RowData} from "mantine-react-table";

export interface CRUDTableProps<T extends MRT_RowData> {
    items: T[];
    onCreate?: (item: T) => void;
    onDelete?: (item: T) => void;
    onChange?: (item: T) => void;
    onSelectionChange?: (selectedItems: T[]) => void;
    tableRef?: RefObject<BaseTableRef<T>>
}