import { MRT_TableOptions, MRT_TableInstance, MRT_ColumnDef, MRT_Row, MRT_Cell } from "mantine-react-table";
import { ReactElement, ReactNode } from "react";
export type TableOption<T> = T extends Record<string, any> ? T : never;
export type TableOptions<T> = MRT_TableOptions<TableOption<T>> & {
    renderCustomTopToolbarComponent?: ({ table, }: {
        table: MRT_TableInstance<TableOption<T>>;
    }) => ReactNode;
};
export type ColumnDef<T> = MRT_ColumnDef<TableOption<T>>;
export type TableInstance<T> = MRT_TableInstance<TableOption<T>>;
export type TableRow<T> = MRT_Row<TableOption<T>>;
export type TableCell<T> = MRT_Cell<TableOption<T>>;
export type CrudOptions<T> = {
    tableRowObject?: T;
    setTableRowObject?: (row: T) => void;
    onEditSaveRow?: (values: Partial<T>) => Promise<unknown>;
    onCreateRow?: (values: Partial<T>) => Promise<unknown>;
    onDeleteRow?: (values: T) => Promise<unknown>;
};
export type CrudAccess = {
    allAccess?: boolean;
    editAccess?: boolean;
    deleteAccess?: boolean;
    createAccess?: boolean;
};
export type RowActionMenuItem<T> = {
    name: string;
    icon: ReactElement;
    onClick?: (row: T) => void;
};
