import type { IEventDetail } from '@breadstone/mosaik-elements';
import type { TableBodyCellElement } from '../Components/Selectors/Table/TableBodyCellElement';
import type { TableBodyRowElement } from '../Components/Selectors/Table/TableBodyRowElement';
import type { ITableColumnEditorItem } from '../Components/Selectors/Table/editor/ITableColumnEditorItem';
/**
 * Represents the event detail for table column sort changed events.
 *
 * @public
 */
export interface ITableSortChangedEventDetail extends IEventDetail {
    /**
     * The sort key.
     */
    readonly sortKey?: string;
    /**
     * The column being sorted.
     */
    readonly column?: string;
    /**
     * The sort direction.
     */
    readonly direction?: 'asc' | 'desc' | 'none';
    /**
     * The sort direction (alias).
     */
    readonly sortDirection?: 'asc' | 'desc' | 'none';
    /**
     * The 1-based sort priority index in multi-sort mode.
     * `undefined` when the column is not sorted or in single-sort mode.
     */
    readonly sortIndex?: number;
    /**
     * All currently active sorts (only populated in multi-sort mode).
     */
    readonly activeSorts?: ReadonlyArray<{
        sortKey: string;
        sortDirection: 'asc' | 'desc';
        sortIndex: number;
    }>;
}
/**
 * Event fired when table sort changes.
 *
 * @public
 */
export type TableSortChangedEvent = CustomEvent<ITableSortChangedEventDetail>;
/**
 * Represents the event detail for table columns changed events.
 *
 * @public
 */
export interface ITableColumnsChangedEventDetail extends IEventDetail {
    /**
     * The visible columns.
     */
    readonly columns: string | ReadonlyArray<string>;
}
/**
 * Event fired when table columns change.
 *
 * @public
 */
export type TableColumnsChangedEvent = CustomEvent<ITableColumnsChangedEventDetail>;
/**
 * Represents the event detail for table selection changed events.
 *
 * @public
 */
export interface ITableSelectionChangedEventDetail extends IEventDetail {
    /**
     * The currently selected rows (when selectionType is 'row').
     */
    readonly selectedRows: ReadonlyArray<TableBodyRowElement>;
    /**
     * The currently selected cells (when selectionType is 'cell').
     */
    readonly selectedCells: ReadonlyArray<TableBodyCellElement>;
}
/**
 * Event fired when table selection changes.
 *
 * @public
 */
export type TableSelectionChangedEvent = CustomEvent<ITableSelectionChangedEventDetail>;
/**
 * Represents the event detail for table column resized events.
 *
 * @public
 */
export interface ITableColumnResizedEventDetail extends IEventDetail {
    /**
     * The index of the resized column.
     */
    readonly columnIndex: number;
    /**
     * The new width of the column in pixels.
     */
    readonly width: number;
}
/**
 * Event fired when a table column is resized.
 *
 * @public
 */
export type TableColumnResizedEvent = CustomEvent<ITableColumnResizedEventDetail>;
/**
 * Represents the event detail for table choose columns events.
 *
 * @public
 */
export interface ITableChooseColumnsEventDetail extends IEventDetail {
    /**
     * The column items available for editing.
     */
    readonly columns: ReadonlyArray<ITableColumnEditorItem>;
}
/**
 * Event fired when the choose columns action is requested.
 *
 * @public
 */
export type TableChooseColumnsEvent = CustomEvent<ITableChooseColumnsEventDetail>;
/**
 * Represents the event detail for table column editor changed events.
 *
 * @public
 */
export interface ITableColumnEditorChangedEventDetail extends IEventDetail {
    /**
     * The updated column items after editing.
     */
    readonly columns: ReadonlyArray<ITableColumnEditorItem>;
}
/**
 * Event fired when column editor changes are applied.
 *
 * @public
 */
export type TableColumnEditorChangedEvent = CustomEvent<ITableColumnEditorChangedEventDetail>;
/**
 * Event fired when the column editor is dismissed.
 *
 * @public
 */
export type TableColumnEditorDismissedEvent = CustomEvent<IEventDetail>;
declare global {
    interface HTMLElementEventMap {
        tableSortChanged: TableSortChangedEvent;
        tableColumnsChanged: TableColumnsChangedEvent;
        columnsChanged: TableColumnsChangedEvent;
        tableSelectionChanged: TableSelectionChangedEvent;
        tableColumnResized: TableColumnResizedEvent;
        tableRequestChooseColumns: CustomEvent<void>;
        tableChooseColumns: TableChooseColumnsEvent;
        tableColumnEditorChanged: TableColumnEditorChangedEvent;
        tableColumnEditorDismissed: TableColumnEditorDismissedEvent;
    }
}
//# sourceMappingURL=TableEvents.d.ts.map