/**
 * Copyright IBM Corp. 2020, 2026
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */
import { PropertyValues, TemplateResult } from 'lit';
import CDSDropdown from '../dropdown/dropdown';
import { SELECTION_FEEDBACK_OPTION } from './defs';
import CDSMultiSelectItem from './multi-select-item';
export { DROPDOWN_SIZE, DROPDOWN_TYPE, DROPDOWN_DIRECTION, } from '../dropdown/dropdown';
export { SELECTION_FEEDBACK_OPTION };
/**
 * Multi select.
 *
 * @element cds-custom-multi-select
 * @fires cds-custom-multi-select-beingselected
 *   The custom event fired before a multi select item is selected upon a user gesture.
 *   Cancellation of this event stops changing the user-initiated selection.
 * @fires cds-custom-multi-select-selected - The custom event fired after a multi select item is selected upon a user gesture.
 * @fires cds-custom-multi-select-beingtoggled
 *   The custom event fired before the open state of this multi select is toggled upon a user gesture.
 *   Cancellation of this event stops the user-initiated toggling.
 * @fires cds-custom-multi-select-toggled
 *   The custom event fired after the open state of this multi select is toggled upon a user gesture.
 */
declare class CDSMultiSelect extends CDSDropdown {
    filterable: any;
    /**
     * The count of selected items.
     */
    private _selectedItemsCount;
    /**
     * The clear button.
     */
    private _clearButtonNode;
    /**
     * The selection button.
     */
    private _selectionButtonNode;
    /**
     * The `<input>` for filtering.
     */
    private _filterInputNode;
    protected get _supportsMenuInputFiltering(): boolean;
    protected willUpdate(changedProperties: PropertyValues): void;
    protected get _menuInputNode(): HTMLInputElement | null;
    protected _clearMenuInputFiltering(): void;
    protected _shouldClearMenuInputOnEscape({ menuOpen, isInputTarget, }: {
        event: KeyboardEvent;
        menuOpen: boolean;
        isInputTarget: boolean;
    }): boolean;
    /**
     * The trigger button.
     */
    private _triggerNode;
    protected _selectionShouldChange(itemToSelect?: CDSMultiSelectItem): boolean;
    protected _selectionDidChange(itemToSelect?: CDSMultiSelectItem): void;
    protected _shouldCloseAfterSelection(item?: CDSMultiSelectItem): item is undefined;
    protected _handleClickInner(event: MouseEvent): void;
    /**
     * Clears selections on Escape click
     */
    protected _handleKeydownInner(event: KeyboardEvent): void;
    protected _handleFocusOut(event: FocusEvent): void;
    /**
     * Handler for the `keypress` event, ensures filter still works upon entering space
     */
    protected _handleKeypressInner(event: KeyboardEvent): void;
    protected _handleMouseoverInner(event: MouseEvent): void;
    protected _handleMouseleaveInner(event: MouseEvent): void;
    /**
     * Special andler for the `keypress` event, ensures space selection for filterable
     * variation is disabled
     */
    protected _handleKeypressInnerFlterable(event: KeyboardEvent): void;
    protected _renderTitleLabel(): TemplateResult<1>;
    protected _renderPrecedingLabel(): TemplateResult<1> | undefined;
    /**
      @returns The main content of the trigger button.
     */
    protected _renderLabel(): TemplateResult;
    protected _renderFollowingLabel(): TemplateResult | undefined;
    /**
     * Handles `input` event on the `<input>` for filtering.
     */
    protected _handleInput(): void;
    /**
     * Navigate through dropdown items.
     *
     * @param direction `-1` to navigate backward, `1` to navigate forward.
     */
    protected _navigate(direction: number): void;
    /**
     * Handles user-initiated clearing the `<input>` for filtering.
     */
    protected _handleUserInitiatedClearInput(): void;
    /**
     * The `aria-label` attribute for the icon to clear selection.
     */
    clearSelectionLabel: string;
    /**
     * Specify the text that should be read for screen readers that describes total items selected
     */
    clearSelectionDescription: string;
    /**
     * Specify the text that should be read for screen readers to clear selection.
     */
    clearSelectionText: string;
    /**
     * Specify the locale of the control. Used for the default compareItems used for sorting the list of items in the control.
     */
    locale: string;
    /**
     * Enables rendering of a “Select all” multi-select-item
     */
    selectAll: boolean;
    /**
     * Specify feedback (mode) of the selection.
     * `top`: selected item jumps to top
     * `fixed`: selected item stays at it's position
     * `top-after-reopen`: selected item jump to top after reopen dropdown
     */
    selectionFeedback: SELECTION_FEEDBACK_OPTION;
    /**
     * The CSS class list for multi-select listbox
     */
    protected get _classes(): any;
    protected defaultCompareItems: (itemA: string, itemB: string, { locale }: {
        locale: string;
    }) => number;
    /**
     * Provide a custom function that is used to determine the ordering of
     * options. The compare function should return a number whose sign indicates
     * the relative order of the two elements: negative if a is less than b,
     * positive if a is greater than b, and zero if they are equal. See 'sortItems'
     * for more control.
     *
     * (itemA: string, itemB: string, { locale }: { locale: string }) => number
     */
    compareItems: (itemA: string, itemB: string, options: {
        locale: string;
    }) => number;
    private getItemValue;
    protected defaultSortItems: (menuItems: NodeList, { values, compareItems, locale }: {
        values: any;
        compareItems: any;
        locale?: string | undefined;
    }) => Node[];
    /**
     * Provide a method that sorts all options in the control. Overriding this
     * prop means that you also have to handle the sort logic for selected versus
     * un-selected items. If you just want to control ordering, consider the
     * `compareItems` prop instead.
     *
     * sortItems :
     * (menuItems: NodeList, {
     *   values: string[],
     *   compareItems: (itemA: string, itemB: string, { locale }: { locale: string }) => number,
     *   locale: string,
     * }) => Node[]
     *
     */
    sortItems: (menuItems: NodeList, options: {
        values: string[];
        compareItems: (itemA: string, itemB: string, options: {
            locale: string;
        }) => number;
        locale: string;
    }) => Node[];
    shouldUpdate(changedProperties: any): boolean;
    updated(changedProperties: any): void;
    firstUpdated(changedProperties: any): void;
    /**
     * Computes the state of the select all option and sets it to either
     * 'selected' or 'indeterminate'
     */
    private _computeSelectAllState;
    /**
     * Clears the filterable input field
     */
    private _clearInput;
    connectedCallback(): void;
    /**
     * A selector that will return menu body.
     */
    static get selectorMenuBody(): string;
    /**
     * A selector that will return highlighted items.
     */
    static get selectorItemHighlighted(): string;
    /**
     * A selector that will return multi select items.
     * We use a separate property from `.itemTagName` due to the nature in difference of tag name vs. selector.
     */
    static get selectorItem(): string;
    /**
     * A selector that will return remaining items after a filter.
     */
    static get selectorItemFiltered(): string;
    /**
     * A selector that will return remaining items after a filter.
     */
    static get selectorItemResults(): string;
    /**
     * A selector that will return selected items.
     */
    static get selectorItemSelected(): string;
    /**
     * The name of the custom event fired before this multi select item is being toggled upon a user gesture.
     * Cancellation of this event stops the user-initiated action of toggling this multi select item.
     */
    static get eventBeforeToggle(): string;
    /**
     * The name of the custom event fired after this multi select item is toggled upon a user gesture.
     */
    static get eventToggle(): string;
    /**
     * The name of the custom event fired before a multi select item is selected upon a user gesture.
     * Cancellation of this event stops changing the user-initiated selection.
     */
    static get eventBeforeSelect(): string;
    /**
     * The name of the custom event fired after a a multi select item is selected upon a user gesture.
     */
    static get eventSelect(): string;
    static styles: any;
}
export default CDSMultiSelect;
//# sourceMappingURL=multi-select.d.ts.map