import { HTMLTemplateResult, LitElement, PropertyValues } from 'lit';
import { ObcTableHeaderItemType } from '../table-header-item/table-header-item.js';
import { CheckboxStatus } from '../checkbox/checkbox.js';
import { TagColor } from '../tag/tag.js';
import { ExternalScaleSide, FillMode, FrameStyle, InstrumentState, Priority, ScaleType } from '../../building-blocks/bar-horizontal/bar-horizontal.js';
import '../table-header-item/table-header-item.js';
import '../button/button.js';
import '../../building-blocks/bar-horizontal/bar-horizontal.js';
export declare enum ObcTableCellType {
    Regular = "regular",
    Button = "button",
    Checkbox = "checkbox",
    Tag = "tag",
    HorizontalBar = "horizontal-bar"
}
export interface ObcTableCellDataRegular {
    type: ObcTableCellType.Regular;
    cssPart?: string;
    neutral?: boolean;
    largeIcon?: boolean;
    noWrap?: boolean;
    vertical?: boolean;
    align?: 'left' | 'center' | 'right';
    text?: string | HTMLTemplateResult;
    title?: string | HTMLTemplateResult;
    icon?: HTMLTemplateResult;
    icon2?: HTMLTemplateResult;
    icon3?: HTMLTemplateResult;
}
export interface ObcTableCellDataButton {
    type: ObcTableCellType.Button;
    cssPart?: string;
    text?: string;
    icon?: HTMLTemplateResult;
}
export interface ObcTableCellDataCheckbox {
    type: ObcTableCellType.Checkbox;
    cssPart?: string;
    label?: string;
    text?: string;
    status?: CheckboxStatus;
    disabled?: boolean;
    ariaDescribedBy?: string;
    align?: 'left' | 'center' | 'right';
}
export interface ObcTableTagData {
    id: string;
    label: string;
    color?: TagColor;
    hasIcon?: boolean;
    icon?: HTMLTemplateResult;
    cssPart?: string;
}
export interface ObcTableCellDataTag {
    type: ObcTableCellType.Tag;
    cssPart?: string;
    align?: 'left' | 'center' | 'right';
    label?: string;
    text?: string;
    color?: TagColor;
    hasIcon?: boolean;
    icon?: HTMLTemplateResult;
    tagId?: string;
    tag?: ObcTableTagData;
    tags?: ObcTableTagData[];
    wrap?: boolean;
    maxTags?: number;
    overflowLabel?: string;
}
export interface ObcTableCellDataHorizontalBar {
    type: ObcTableCellType.HorizontalBar;
    cssPart?: string;
    align?: 'left' | 'center' | 'right';
    minValue?: number;
    maxValue?: number;
    value?: number;
    setpoint?: number;
    hasBar?: boolean;
    hasScale?: boolean;
    hideLabels?: boolean;
    priority?: Priority;
    fillMode?: FillMode;
    fillMin?: number;
    fillMax?: number;
    barThickness?: number;
    scaleType?: ScaleType;
    frameStyle?: FrameStyle;
    side?: ExternalScaleSide;
    state?: InstrumentState;
    fixedAspectRatio?: boolean;
    scaleReferenceSize?: number;
}
export type ObcTableCellData = ObcTableCellDataRegular | ObcTableCellDataButton | ObcTableCellDataCheckbox | ObcTableCellDataTag | ObcTableCellDataHorizontalBar;
export interface ObcTableRow {
    selected?: boolean;
    id: string;
    [key: string]: ObcTableCellData | boolean | undefined | string;
}
export interface ObcTableColumnUnsortable<T extends ObcTableCellData, S extends ObcTableRow> {
    label: string;
    key: string;
    headerType?: ObcTableHeaderItemType;
    renderHeaderIcon?: () => HTMLTemplateResult;
    renderCell?: (value: T, row: S, rowId: string) => HTMLTemplateResult;
    dividerRight?: boolean;
}
export interface ObcTableColumnSortable<T extends ObcTableCellData, S extends ObcTableRow> extends ObcTableColumnUnsortable<T, S> {
    sortable: true;
    sortDirection?: 'asc' | 'desc';
    compareFunction: (a: T, b: T, aRow: S, bRow: S) => number;
}
export type ObcTableColumn<T extends ObcTableCellData = ObcTableCellData, S extends ObcTableRow = ObcTableRow> = ObcTableColumnUnsortable<T, S> | ObcTableColumnSortable<T, S>;
export type ObcTableCellClickEvent = CustomEvent<{
    rowId: string;
    columnKey: string;
}>;
export type ObcTableCellCheckboxChangeEvent = CustomEvent<{
    rowId: string;
    columnKey: string;
    status: CheckboxStatus;
    disabled: boolean;
}>;
export type ObcTableCellTagClickEvent = CustomEvent<{
    rowId: string;
    columnKey: string;
    tagId: string;
}>;
export type ObcTableSelectionChangeEvent = CustomEvent<{
    selectedRowIds: string[];
    selectedRows: ObcTableRow[];
    source: 'row' | 'header';
}>;
export type ObcTableRowClickEvent = CustomEvent<{
    row: ObcTableRow;
}>;
/**
 * `<obc-table>` renders tabular data with configurable columns and cell types.
 *
 * Overview
 * Use this component to display structured datasets with optional selection, sorting, and rich cell
 * rendering. It accepts `data` and `columns` and renders rows based on column configuration.
 *
 * Features/Variants
 * - Selectable rows with header “select all” checkbox via `selectable=true`.
 * - Cell rendering variants: `checkbox`, `tag`, `horizontal-bar`, and `button` cell types.
 * - Visual variants: `rowDivider`, `striped`, `narrowHeader`, and `showHeader`.
 * - Sorting support for sortable columns via column definitions.
 *
 * Usage Guidelines
 * - Controlled selection: pass `selectedRowIds` and update it on `selection-change`.
 * - Uncontrolled selection: pass `defaultSelectedRowIds` and listen to `selection-change`.
 * - Use `selectAllAriaLabel` to customize the header checkbox accessibility label.
 *
 * Slots/Content
 * - This component does not expose public slots. Provide content via `data` and `columns`.
 *
 * Events
 * - `row-click` fires when a row is clicked.
 * - `cell-button-click` fires when a button cell is clicked.
 * - `cell-checkbox-change` fires when a checkbox cell changes.
 * - `cell-tag-click` fires when a tag inside a cell is clicked.
 * - `selection-change` fires when row selection changes (source: `row` or `header`).
 *
 * Best Practices
 * - Keep column `key` values stable across renders to avoid selection or sorting resets.
 * - Prefer `selectedRowIds` for deterministic state in apps with external stores.
 * - For dense tables, combine `narrowHeader` and `rowDivider` for visual clarity.
 *
 * Example (keywords: table, data grid, grid, tabular, datatable)
 * ```ts
 * html`<obc-table
 *   .data=${rows}
 *   .columns=${columns}
 *   selectable
 *   striped
 *   @selection-change=${onSelectionChange}
 * ></obc-table>`;
 * ```
 *
 * @fires row-click {ObcTableRowClickEvent} - Fired when a row is clicked.
 * @fires cell-button-click {ObcTableCellClickEvent} - Fired when a cell button is clicked.
 * @fires cell-checkbox-change {ObcTableCellCheckboxChangeEvent} - Fired when a cell checkbox is changed.
 * @fires cell-tag-click {ObcTableCellTagClickEvent} - Fired when a tag inside a cell is clicked.
 * @fires selection-change {ObcTableSelectionChangeEvent} - Fired when row selection changes.
 */
export declare class ObcTable extends LitElement {
    data: ObcTableRow[];
    columns: ObcTableColumn[];
    rowDivider: boolean;
    narrowHeader: boolean;
    showHeader: boolean;
    striped: boolean;
    selectable: boolean;
    selectedRowIds?: string[];
    defaultSelectedRowIds?: string[];
    selectAllAriaLabel: string;
    private _sortByColumnIdx;
    private _sortDirection;
    private _selectedRowIds;
    private _previousPositions;
    get sortedData(): ObcTableRow[];
    private _handleSortClick;
    private _handleRowClick;
    private _focusFirstRow;
    private _focusLeftHeaderItem;
    private _focusHeaderByIndex;
    private _handleHeaderKeyDown;
    private _handleRowKeyDown;
    private _getAllPositions;
    private _animateRowChanges;
    private _hasRenderedRows;
    willUpdate(changedProperties: PropertyValues): void;
    updated(changedProperties: PropertyValues): void;
    private _updatePositions;
    render(): import('lit-html').TemplateResult<1>;
    getAllVisibleRows(): string[];
    private _handleCellButtonClick;
    private _handleCellTagClick;
    private _handleCellCheckboxChange;
    private _getSelectableRowIds;
    private _getSelectionStatus;
    private _emitSelectionChange;
    private _applySelectionChange;
    private _toggleRowSelection;
    private _toggleAllSelection;
    private _renderCell;
    static styles: import('lit').CSSResult;
}
declare global {
    interface HTMLElementTagNameMap {
        'obc-table': ObcTable;
    }
}
//# sourceMappingURL=table.d.ts.map