import { AccessibilityProps } from '../shared/index.js';

interface ColumnDef<T = Record<string, unknown>> {
    /** Unique column identifier */
    id: string;
    /** Column header text */
    header: string;
    /** Accessor function to get cell value from row */
    accessor: (row: T) => unknown;
    /** Whether this column is sortable */
    sortable?: boolean;
    /** Whether this column is filterable */
    filterable?: boolean;
}
type SortDirection = 'asc' | 'desc';
interface DataTableProps<T = Record<string, unknown>> {
    /** Column definitions */
    columns: ColumnDef<T>[];
    /** Data rows */
    data: T[];
    /** Current sort column */
    sortBy?: string;
    /** Current sort direction */
    sortDir?: SortDirection;
    /** Callback when sort changes */
    onSort?: (columnId: string, direction: SortDirection) => void;
    /** Active filters: columnId -> filter value */
    filters?: Record<string, string>;
}
interface DataTableState<T = Record<string, unknown>> {
    sortedData: T[];
    sortBy: string | null;
    sortDir: SortDirection;
    filters: Record<string, string>;
}
interface DataTableAPI<T = Record<string, unknown>> {
    /** Current table state */
    state: DataTableState<T>;
    /** Toggle sort for a column */
    sort(columnId: string): void;
    /** Set a filter value for a column */
    setFilter(columnId: string, value: string): void;
    /** Get ARIA and role props for a header cell */
    getHeaderProps(col: ColumnDef<T>): Partial<AccessibilityProps> & Record<string, unknown>;
    /** Get props for a data cell */
    getCellProps(col: ColumnDef<T>, row: T): Record<string, unknown>;
    /** Get props for a data row */
    getRowProps(row: T, index: number): Record<string, unknown>;
}
declare function createDataTable<T = Record<string, unknown>>(props: DataTableProps<T>): DataTableAPI<T>;

declare const tableVariants: (props?: ({
    size?: "sm" | "md" | "lg" | undefined;
} & {
    className?: string;
}) | undefined) => string;
declare const headerVariants: (props?: ({
    sortable?: "true" | "false" | undefined;
} & {
    className?: string;
}) | undefined) => string;
declare const cellVariants: (props?: ({
    size?: "sm" | "md" | "lg" | undefined;
} & {
    className?: string;
}) | undefined) => string;
declare const rowVariants: (props?: ({
    selected?: "true" | "false" | undefined;
} & {
    className?: string;
}) | undefined) => string;

export { type ColumnDef, type DataTableAPI, type DataTableProps, type DataTableState, type SortDirection, cellVariants, createDataTable, headerVariants, rowVariants, tableVariants };
