/**
 * DataTable type definitions
 * @countermeasure/web-components/components/data-table
 */
export type SortDirection = 'asc' | 'desc' | null;
export type CellRenderer = 'text' | 'badge' | 'link' | 'code' | 'bytes' | 'datetime' | 'number';
export interface ColumnDef {
    /** Unique key matching the row tuple position. */
    key: string;
    /** Header label rendered for the column. */
    label: string;
    /**
     * Whether the column header toggles sorting on click.
     * @default false
     */
    sortable?: boolean;
    /** Optional fixed width (CSS length, e.g. `'120px'`). */
    width?: string;
    /**
     * Cell renderer used to format the value.
     * @default 'text'
     */
    renderer?: CellRenderer;
    /** Format string consumed by the renderer (e.g. `'relative'` for datetime). */
    format?: string;
    /** Map of value -> CSS class for the `'badge'` renderer. */
    badgeMap?: Record<string, string>;
    /** Additional CSS class applied to every cell in the column. */
    className?: string;
}
export interface SortState {
    key: string;
    direction: SortDirection;
}
export interface DataTableConfig {
    /** Container element (or selector) the table is mounted into. */
    container: HTMLElement | string;
    /** Ordered column definitions. */
    columns: ColumnDef[];
    /**
     * Row data as an array of value tuples aligned with `columns`.
     * @default []
     */
    data?: unknown[][];
    /** Pagination configuration. Omit to disable pagination. */
    pagination?: PaginationConfig;
    /** Export formats to expose in the toolbar. */
    exportFormats?: ('csv' | 'json' | 'clipboard')[];
    /**
     * Message displayed when `data` is empty.
     * @default 'No data'
     */
    emptyMessage?: string;
    /** Called when a sortable column header is activated. */
    onSort?: (key: string, direction: SortDirection) => void;
    /** Called when a row is clicked or activated via keyboard. */
    onRowClick?: (row: unknown[], index: number) => void;
    /** Called when the user opens the row's context menu (right-click). */
    onRowContext?: (row: unknown[], index: number, event: MouseEvent) => void;
}
export interface PaginationConfig {
    /**
     * Rows per page.
     * @default 10
     */
    pageSize: number;
    /**
     * Where to render the pagination controls.
     * @default 'bottom'
     */
    position?: 'top' | 'bottom' | 'both';
}
//# sourceMappingURL=types.d.ts.map