/**
 * Copyright (c) Cisco Systems, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
import "../button/Button";
import "../icon/Icon";
import "../menu-overlay/MenuOverlay";
import { LitElement, nothing, PropertyValues, TemplateResult } from "lit";
import { Evt, TemplateCallback, TemplateInfo } from "./src/decorators";
import { Filter } from "./src/filter";
export declare namespace TableAdvanced {
    const ELEMENT_base: import("../../mixins/FocusTrapMixin").FocusTrapMixinReturnType<typeof LitElement>;
    /**
     * @element md-table-advanced
     * @fires md-table-advanced-change
     */
    export class ELEMENT extends ELEMENT_base {
        config: Config | string;
        data: Data | string;
        isRowFocusable: string;
        "md-table-advanced-change": Evt<ChangeEvent>;
        tableConfig: Config;
        tableData: Data;
        private error;
        private COLS;
        private ROWS;
        private readonly updCols;
        private readonly updRows;
        private dragRow;
        private dropRow;
        private drops;
        private dragRowElem;
        private dragCol;
        private dropCol;
        private isResizing;
        private isSelectable;
        private selected;
        private expandedRowIdx;
        private readonly dragover;
        tableRaws?: HTMLTableRowElement[];
        disconnectedCallback(): void;
        connectedCallback(): void;
        protected update(changedProperties: PropertyValues): void;
        private updateTableData;
        private updateTableConfig;
        private populateColumns;
        private populateData;
        private validateData;
        private populateTemplate;
        private setDefaultFilterAndSort;
        private populateTable;
        private updateDataInTable;
        private onDropRow;
        private onDropCol;
        private sort;
        private filter;
        private selectRow;
        private clearSelection;
        private collapseToggle;
        private eX;
        private onResize;
        render(): TemplateResult<1>;
        private ariaSortOrder;
        private renderHead;
        sortIconTemplate(sortOrder: SortOrder): TemplateResult | typeof nothing;
        private renderCol;
        private renderColDrag;
        private renderColResize;
        private renderBody;
        private processTemplate;
        private processTemplateCallback;
        private renderRow;
        static get styles(): import("lit").CSSResult[];
    }
    type ColId = string;
    export type Data = {
        csv: string;
    } | {
        list: string[];
    } | {
        list2d: string[][];
    };
    export type Config = {
        isStickyHeader?: boolean;
        isInfiniteScroll?: boolean;
        cols: {
            define: (ColOptions | ColOptionsGroup)[];
            isDraggable?: boolean;
            isResizable?: boolean;
            collapse?: ColId;
        };
        rows?: {
            isDraggable?: boolean;
            selectable?: "none" | "single" | "multiple";
        };
        cellTemplates?: Record<string, CellTemplate>;
        default?: {
            col?: Pick<ColOptions, "filters" | "sorter">;
            sort?: {
                colId: ColId;
                order: SortOrder;
            };
            filter?: {
                colId: ColId;
                input: string;
                selectedIndex: number;
            };
        };
        head?: {
            caption?: string;
            summary?: string;
            tableDescription?: string;
        };
    };
    type ColOptions = {
        id: string;
        title: string;
        width?: string;
        sorter?: "byString" | "byNumber" | SortComparator;
        filters?: "forString" | "forNumber" | Filter.Options[];
        isHeader?: boolean;
    };
    type ColOptionsGroup = {
        groupName: string;
        children: ColOptions[];
    };
    type SortOrder = "default" | "ascending" | "descending";
    type SortComparator = (a: string, b: string, direction: 1 | -1) => number;
    type CellTemplate = {
        templateName: string;
        contentUse?: "insert" | "replace";
        contentCb?: CellContentCallback;
        templateCb?: TemplateCallback;
    };
    type CellContentCallback = (p: TemplateInfo) => string;
    export type ChangeEvent = {
        detail: {
            type: "filter-on";
            filter: Filter.Options;
            input: string;
        } | {
            type: "filter-off";
            filter: Filter.Options;
        } | {
            type: "sort";
            order: SortOrder;
        } | {
            type: "select";
            index: number;
        } | {
            type: "multi-select";
            rows: number[];
        } | {
            type: "expand";
            row: number;
        } | {
            type: "collapse";
            row: number;
        };
    };
    export {};
}
declare global {
    interface HTMLElementTagNameMap {
        "md-table-advanced": TableAdvanced.ELEMENT;
    }
}
