import { Column, ColumnDef, Row, Table } from '@tanstack/vue-table';
import { ColumnHeaderLabels, ColumnFilterLabels, PaginationLabels } from './constants';
/**
 * A feature-rich data table with sorting, filtering, and pagination.
 * Use for displaying and managing large datasets with interactive features.
 * @category Layout
 * @useCases data grid, admin table, user list, product catalog, reports
 * @keywords datatable, grid, sorting, filtering, pagination, data, list
 * @related UiTable
 */
export type UiDataTableProps<TData, TValue> = {
    /**
     * The column definitions for the table.
     */
    columns: ColumnDef<TData, TValue>[];
    /**
     * The data to display in the table.
     */
    data: TData[];
    /**
     * Text to display when there are no results.
     * @default "No results."
     */
    emptyText?: string;
    /**
     * Function to derive a unique ID for each row. Important for proper row selection
     * and state management when data changes. Defaults to using the row index.
     * @example (row) => row.id
     */
    getRowId?: (originalRow: TData, index: number, parent?: Row<TData>) => string;
    /**
     * Minimum height for the table container. Useful for preventing layout shifts
     * during pagination. The last row will have a visible bottom border even when
     * the container is taller than the content.
     * @example "400px"
     */
    tableMinHeight?: string;
    /**
     * Callback when a data row is clicked. Receives the row's original data item.
     * @example (item) => router.push(`/details/${item.id}`)
     */
    onRowClick?: (item: TData) => void;
    /**
     * Enables drag-and-drop reordering for table columns.
     * @default false
     */
    draggableColumns?: boolean;
    /**
     * Callback when column order changes through drag-and-drop.
     * Receives TanStack column IDs in their new order.
     */
    onColumnOrderChange?: (columnOrder: string[]) => void;
    /**
     * Function that determines whether a row can be expanded.
     * Provide an `expanded-row` slot and toggle `row.toggleExpanded()` from a cell.
     * @example (row) => row.original.children.length > 0
     */
    getRowCanExpand?: (row: Row<TData>) => boolean;
};
/**
 * Props for the UiDataTableColumnHeader component.
 */
export type UiDataTableColumnHeaderProps<TData, TValue> = {
    /**
     * The TanStack Table column instance.
     * @internal
     */
    column: Column<TData, TValue>;
    /** The display text for the column header. */
    title: string;
    /**
     * Custom labels for i18n support.
     * Partial object that merges with defaults.
     */
    labels?: ColumnHeaderLabels;
};
/**
 * Props for the UiDataTablePagination component.
 */
export type UiDataTablePaginationProps<TData> = {
    /**
     * The TanStack Table instance.
     * @internal
     */
    table: Table<TData>;
    /**
     * Available page size options.
     * @default [10, 20, 30, 50]
     */
    pageSizeOptions?: number[];
    /**
     * Show page size selector dropdown.
     * @default true
     */
    showPageSize?: boolean;
    /**
     * Show selected rows count.
     * @default true
     */
    showSelection?: boolean;
    /**
     * Custom labels for i18n support.
     * Partial object that merges with defaults.
     */
    labels?: PaginationLabels;
};
/**
 * Props for the UiDataTableColumnFilter component.
 */
export type UiDataTableColumnFilterProps<TData> = {
    /**
     * The TanStack Table instance.
     * @internal
     */
    table: Table<TData>;
    /**
     * Custom labels for i18n support.
     * Partial object that merges with defaults.
     */
    labels?: ColumnFilterLabels;
};
