import { default as CxIcon } from '../../../../../atoms/src/components/icon/icon.ts';
import { default as CxIconButton } from '../../../../../atoms/src/components/icon-button/icon-button.ts';
import { default as CxInput } from '../../../../../atoms/src/components/input/input.ts';
import { default as CxTooltip } from '../../../../../atoms/src/components/tooltip/tooltip.ts';
import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
import { BoardItem } from '../../../../../types/src/board';
import { default as Sortable } from 'sortablejs';
import { default as CxBoardListItem } from '../board-list-item/board-list-item';

export type CxBoardChangeEvent = CustomEvent<Record<PropertyKey, unknown>>;
export type CxBoardSelectedChangeEvent = CustomEvent<Record<PropertyKey, unknown>>;
export type CxBoardItemAddedEvent = CustomEvent<Record<PropertyKey, unknown>>;
export type CxBoardItemRemovedEvent = CustomEvent<Record<PropertyKey, unknown>>;
declare global {
    interface GlobalEventHandlersEventMap {
        'cx-board-change': CxBoardChangeEvent;
        'cx-board-item-added': CxBoardItemAddedEvent;
        'cx-board-item-removed': CxBoardItemRemovedEvent;
        'cx-board-selected-change': CxBoardSelectedChangeEvent;
    }
}
/**
 * @summary Board is a list of items that can be reordered by dragging and dropping them.
 *
 * @event {{ items: string[] }} cx-sort-change - Emitted when the list items changes.
 */
export default class CxBoard extends CortexElement {
    static readonly styles: import('lit').CSSResult[];
    static readonly dependencies: {
        'cx-board-list-item': typeof CxBoardListItem;
        'cx-icon': typeof CxIcon;
        'cx-icon-button': typeof CxIconButton;
        'cx-input': typeof CxInput;
        'cx-tooltip': typeof CxTooltip;
    };
    private readonly localize;
    board: HTMLElement;
    searchInput?: CxInput;
    searchInputClear?: CxIconButton;
    list: HTMLElement;
    selectAllCheckBox: HTMLElement;
    boardTitle: string;
    name: string;
    ignoreTypes: string[];
    data: BoardItem[];
    sort: boolean;
    group: boolean;
    configurable: boolean;
    all: boolean;
    allowSearch: boolean;
    /**
     * A boolean property that indicates whether the drag operation should be aborted.
     * When set to `true`, the current drag action will be canceled,
     * and the dragged items will be placed back to their original position.
     */
    abortDrag: boolean;
    items: BoardItem[];
    private _allItems;
    get allItems(): BoardItem[];
    private _filteredItems;
    get filteredItems(): BoardItem[];
    /** The selected items in the board. */
    private _selectedItems;
    private _selectedItemOrder;
    get selectedItemAsArray(): string[];
    get selectedItems(): Record<string, boolean>;
    get selectedItemOrder(): Record<string, number>;
    searchValue: string;
    private sortable;
    private _totalCount;
    private _totalDisplayedCount;
    private _indexMap;
    get totalCount(): number;
    get totalDisplayedCount(): number;
    private isDragging;
    private start;
    private end;
    private previous;
    private lastSelectedItem;
    get selectedCount(): number;
    get isAllSelected(): boolean;
    get isPartiallySelected(): boolean;
    constructor();
    private resetSelectedItems;
    /** Handles the update of items in the board. */
    private handleUpdateEvent;
    private handleSelectedChange;
    private handleItemConfigure;
    private handleListScroll;
    private handleSearchChange;
    private handleSearchClear;
    private concatGroupItems;
    onSearchValueChanged(): void;
    onItemsChanged(): void;
    handleAdd(evt: Sortable.SortableEvent): void;
    handleEnd(evt: Sortable.SortableEvent): Promise<void>;
    handleRemove(evt: Sortable.SortableEvent): void;
    handleDefaultSelect(item: CxBoardListItem): void;
    handleShiftSelect(item: CxBoardListItem): void;
    handleSelect(evt: MouseEvent): void;
    handleStart(evt: Sortable.SortableEvent): void;
    handleUpdate(evt: Sortable.SortableEvent): void;
    deselectAll(force?: boolean): void;
    selectAll(): void;
    handleSelectAll(): void;
    onAllChanged(): void;
    private initSortable;
    /** Initializes the sortable functionality for the list element. */
    runFirstUpdated(): void;
    render(): import('lit').TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        'cx-board': CxBoard;
    }
}
