import { CSSProperties, ReactNode } from 'react';
import { ActionMenuItem } from '../../navigation/ActionMenu';
export type SortDirection = "asc" | "desc";
export type TableDensity = "compact" | "default" | "comfortable";
export type TableAlign = "left" | "center" | "right";
export type DataTableSorting = {
    columnId: string;
    direction: SortDirection;
};
export type DataTableColumn<Row> = {
    id: string;
    header: ReactNode;
    accessorKey?: keyof Row;
    accessorFn?: (row: Row) => unknown;
    sortValue?: (row: Row) => unknown;
    cell?: (row: Row, context: {
        value: unknown;
        rowIndex: number;
        selected: boolean;
        hovered: boolean;
    }) => ReactNode;
    sortable?: boolean;
    width?: number | string;
    minWidth?: number | string;
    align?: TableAlign;
    className?: string;
    headerClassName?: string;
    style?: CSSProperties;
    headerStyle?: CSSProperties;
};
export type DataTableLeadingColumn<Row> = {
    header: ReactNode;
    cell: (row: Row, context: {
        rowIndex: number;
        selected: boolean;
        hovered: boolean;
    }) => ReactNode;
    width?: number | string;
    minWidth?: number | string;
    className?: string;
    headerClassName?: string;
    style?: CSSProperties;
    headerStyle?: CSSProperties;
};
export type DataTablePagination = {
    page: number;
    totalPages: number;
    pageSize?: number;
    totalItems?: number;
    pageSizeOptions?: number[];
    onPageChange: (page: number) => void;
    onPageSizeChange?: (pageSize: number) => void;
};
export type DataTableProps<Row> = {
    data: Row[];
    columns: DataTableColumn<Row>[];
    getRowId?: (row: Row, index: number) => string;
    loading?: boolean;
    error?: ReactNode;
    emptyState?: ReactNode;
    emptyTitle?: ReactNode;
    emptyDescription?: ReactNode;
    pagination?: DataTablePagination;
    enableSorting?: boolean;
    sorting?: DataTableSorting | null;
    defaultSorting?: DataTableSorting | null;
    onSortingChange?: (sorting: DataTableSorting | null) => void;
    visibleColumnIds?: string[];
    columnOrder?: string[];
    defaultColumnOrder?: string[];
    onColumnOrderChange?: (columnOrder: string[]) => void;
    enableColumnPinning?: boolean;
    pinnedColumnCount?: number;
    defaultPinnedColumnCount?: number;
    onPinnedColumnCountChange?: (count: number) => void;
    pinLeadingColumn?: boolean;
    defaultPinLeadingColumn?: boolean;
    onPinLeadingColumnChange?: (pinned: boolean) => void;
    enableColumnReordering?: boolean;
    resetKey?: string | number;
    showSortIcon?: "always" | "active" | "never";
    leadingColumn?: DataTableLeadingColumn<Row>;
    rowActions?: (row: Row) => ReactNode;
    rowActionsHeader?: ReactNode;
    rowActionsWidth?: number | string;
    stickyRowActions?: boolean;
    selection?: boolean;
    selectedRowIds?: string[];
    onSelectedRowIdsChange?: (ids: string[]) => void;
    stickyHeader?: boolean;
    minWidth?: number | string;
    density?: TableDensity;
    className?: string;
    tableClassName?: string;
    headerClassName?: string;
    rowClassName?: string | ((row: Row, index: number) => string | undefined);
    cellClassName?: string;
    onRowClick?: (row: Row) => void;
    "aria-label"?: string;
};
export type TableToolbarProps = {
    title?: ReactNode;
    description?: ReactNode;
    totalLabel?: ReactNode;
    loadingLabel?: ReactNode;
    search?: ReactNode;
    actions?: ReactNode;
    columnVisibility?: ReactNode;
    className?: string;
};
export type TablePaginationProps = DataTablePagination & {
    itemLabel?: string;
    className?: string;
};
export type TableStateProps = {
    title?: ReactNode;
    description?: ReactNode;
    action?: ReactNode;
    colSpan?: number;
    className?: string;
};
export type TableSkeletonProps = {
    rows?: number;
    columns?: number;
    density?: TableDensity;
    colSpan?: number;
};
export type TableRowActionsProps<Row> = {
    row: Row;
    getItems: (row: Row) => ActionMenuItem[];
    label?: string;
};
export type TableBulkActionsProps = {
    selectedCount: number;
    actions?: ReactNode;
    onClearSelection?: () => void;
    label?: ReactNode;
    className?: string;
};
export type TableColumnVisibilityColumn = {
    id: string;
    label: ReactNode;
    disabled?: boolean;
};
export type TableColumnVisibilityProps = {
    columns: TableColumnVisibilityColumn[];
    visibleColumnIds: string[];
    onVisibleColumnIdsChange: (ids: string[]) => void;
    label?: ReactNode;
    resetLabel?: ReactNode;
    onReset?: () => void;
    className?: string;
};
