/**
 * Copyright IBM Corp. 2019, 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 { LitElement, TemplateResult } from 'lit';
import { DROPDOWN_DIRECTION, DROPDOWN_KEYBOARD_ACTION, DROPDOWN_SIZE, DROPDOWN_TYPE, NAVIGATION_DIRECTION } from './defs';
import CDSDropdownItem from './dropdown-item';
export { DROPDOWN_KEYBOARD_ACTION, DROPDOWN_DIRECTION, DROPDOWN_SIZE, DROPDOWN_TYPE, NAVIGATION_DIRECTION, };
declare const CDSDropdown_base: (new (...args: any[]) => {
    _getValidityMessage(state: string): string | undefined;
    _testValidity(): string;
    invalid: boolean;
    required: boolean;
    requiredValidityMessage: string;
    validityMessage: string;
    get value(): string;
    set value(v: string): any;
    checkValidity(): boolean;
    setCustomValidity(validityMessage: string): void;
}) & {
    new (...args: any[]): {
        _handles: Set<import("../../globals/internal/handle").default>;
        connectedCallback(): void;
        disconnectedCallback(): void;
    };
    _hostListeners: {
        [listenerName: string]: {
            [type: string]: {
                options?: boolean | AddEventListenerOptions;
            };
        };
    };
} & (new (...args: any[]) => {
    _hFormdata: import("../../globals/internal/handle").default | null;
    _handleFormdata(event: Event): void;
    connectedCallback(): void;
    disconnectedCallback(): void;
}) & (new (...args: any[]) => {
    focus(): void;
}) & typeof LitElement;
/**
 * Dropdown.
 *
 * @element cds-dropdown
 * @csspart label-text The label text.
 * @csspart helper-text The helper text.
 * @csspart trigger-button The trigger button.
 * @csspart menu-body The menu body.
 * @csspart validity-message The validity message.
 * @fires cds-dropdown-beingselected
 *   The custom event fired before a dropdown item is selected upon a user gesture.
 *   Cancellation of this event stops changing the user-initiated selection.
 * @fires cds-dropdown-beingtoggled
 *   The custom event fired before the open state of this dropdown is toggled upon a user gesture.
 *   Cancellation of this event stops the user-initiated toggling.
 * @fires cds-dropdown-selected - The custom event fired after a dropdown item is selected upon a user gesture.
 * @fires cds-dropdown-toggled - The custom event fired after the open state of this dropdown is toggled upon a user gesture.
 */
declare class CDSDropdown extends CDSDropdown_base {
    /**
     * `true` if there is an AI Label.
     */
    protected _hasAILabel: boolean;
    /**
     * Currently slotted AI decorator nodes (`cds-ai-label`/slug) with listeners attached.
     */
    private _aiDecoratorNodes;
    /**
     * Floating UI controller instance for autoalign positioning.
     */
    private _floatingController;
    /**
     * Handles interaction on an AI decorator while the menu is open.
     */
    private _handleAIDecoratorInteraction;
    protected _activeDescendant?: string;
    /**
     * The content of the selected item.
     */
    protected _selectedItemContent: DocumentFragment | null;
    /**
     * `true` if the trigger button should be focusable.
     * Derived class can set `false` to this if the trigger button contains another primary focusable element (e.g. `input`).
     */
    protected _shouldTriggerBeFocusable: boolean;
    /**
     * The list box `<div>` node.
     */
    protected _listBoxNode: HTMLDivElement;
    /**
     * The menu body element.
     */
    protected _menuBodyNode: HTMLDivElement;
    /**
     * The trigger button element.
     */
    protected _triggerButtonNode: HTMLDivElement;
    /**
     * The `<slot>` element for the helper text in the shadow DOM.
     */
    protected _slotHelperTextNode: HTMLSlotElement;
    /**
     * The `<slot>` element for the title text in the shadow DOM.
     */
    protected _slotTitleTextNode: HTMLSlotElement;
    /**
     * @param itemToSelect A dropdown item. Absense of this argument means clearing selection.
     * @returns `true` if the selection of this dropdown should change if the given item is selected upon user interaction.
     */
    protected _selectionShouldChange(itemToSelect?: CDSDropdownItem): boolean;
    /**
     * A callback that runs after change in dropdown selection upon user interaction is confirmed.
     *
     * @param itemToSelect
     *   A dropdown item.
     *   Absense of this argument means clearing selection, which may be handled by a derived class.
     */
    protected _selectionDidChange(itemToSelect?: CDSDropdownItem): void;
    /**
     * Handles `click` event on the top-level element in the shadow DOM.
     *
     * @param event The event.
     */
    protected _handleClickInner(event: MouseEvent): void;
    /**
     * Handler for the `keydown` event on the top-level element in the shadow DOM.
     */
    protected _handleKeydownInner(event: KeyboardEvent): void;
    private _handleMenuInputKeydown;
    protected _shouldClearMenuInputOnEscape({ menuOpen, }: {
        event: KeyboardEvent;
        menuOpen: boolean;
        isInputTarget: boolean;
    }): boolean;
    protected get _supportsMenuInputFiltering(): boolean;
    protected get _menuInputNode(): HTMLInputElement | null;
    protected _clearMenuInputFiltering(): void;
    private _shouldForwardKeyToMenuInput;
    private _forwardKeyToMenuInput;
    private _shouldRetainMenuInputFocus;
    /**
     * Handles keypress events (Space, Enter)
     */
    protected _handleKeypressInner(event: KeyboardEvent): void;
    /**
     * Handles `blur` event handler on the document this element is in.
     *
     * @param event The event.
     */
    protected _handleMouseoverInner(event: MouseEvent): void;
    protected _handleMouseleaveInner(event: MouseEvent): void;
    protected _handleFocusOut(event: FocusEvent): void;
    /**
     * Handles `slotchange` event for the `<slot>` for helper text.
     */
    protected _handleSlotchangeHelperText(): void;
    /**
     * Handles `slotchange` event for the `<slot>` for label text.
     */
    protected _handleSlotchangeLabelText(): void;
    /**
     * Handles `slotchange` event.
     */
    protected _handleAILabelSlotChange({ target }: Event): void;
    disconnectedCallback(): void;
    /**
     * Updates listeners for AI decorator nodes to ensure only one menu stays open.
     */
    private _updateAIDecoratorListeners;
    /**
     * Handles user-initiated selection of a dropdown item.
     *
     * @param [item] The dropdown item user wants to select. Absense of this argument means clearing selection.
     */
    protected _handleUserInitiatedSelectItem(item?: CDSDropdownItem): void;
    protected _shouldCloseAfterSelection(item?: CDSDropdownItem): boolean;
    /**
     * Handles user-initiated toggling the open state.
     *
     * @param [force] If specified, forces the open state to the given one.
     */
    protected _handleUserInitiatedToggle(force?: boolean, { restoreTriggerFocus, focusMenu, highlightSelectedOnOpen, }?: {
        restoreTriggerFocus?: boolean;
        focusMenu?: boolean;
        highlightSelectedOnOpen?: boolean;
    }): void;
    /**
     * Clears the selection of dropdown items.
     */
    protected _clearHighlight(): void;
    protected _getDropdownItemFromEvent(event: Event): CDSDropdownItem | null;
    protected _setHighlightedItem(item?: CDSDropdownItem | null, { scrollIntoView }?: {
        scrollIntoView?: boolean;
    }): void;
    protected _getNextDropdownItem(item: CDSDropdownItem): CDSDropdownItem | null;
    protected _updateSelectedNextSibling(item?: CDSDropdownItem | null): void;
    protected _highlightSelectedItem(): void;
    protected _navigate(direction: number): void;
    /**
     * @returns The content preceding the trigger button.
     */
    protected _renderPrecedingLabel(): TemplateResult | undefined;
    /**
     * @returns The main content of the trigger button.
     */
    protected _renderLabel(): TemplateResult;
    /**
     * @returns The title label.
     */
    protected _renderTitleLabel(): TemplateResult;
    /**
     * @returns The content following the trigger button.
     */
    protected _renderFollowingLabel(): TemplateResult | undefined;
    /**
     * Handles event to include selected value on the parent form.
     *
     * @param event The event.
     */
    _handleFormdata(event: FormDataEvent): void;
    /**
     * 'aria-label' of the ListBox component.
     * Specify a label to be read by screen readers on the container node
     */
    ariaLabel: string;
    /**
     * Specify the direction of the dropdown. Can be either top or bottom.
     */
    direction: DROPDOWN_DIRECTION;
    /**
     * Specify whether auto align functionality should be applied
     */
    autoalign: boolean;
    /**
     * `true` if this dropdown should be disabled.
     */
    disabled: boolean;
    /**
     * The helper text.
     */
    helperText: string;
    /**
     * Specify whether the title text should be hidden or not
     */
    hideLabel: boolean;
    /**
     * `true` to show the UI of the invalid state.
     */
    invalid: boolean;
    /**
     * Message which is displayed if the value is invalid.
     */
    invalidText: string;
    /**
     * Provide the title text that will be read by a screen reader when visiting this control
     */
    titleText: string;
    /**
     * Name for the dropdown in the `FormData`
     */
    name: string;
    /**
     * `true` if this dropdown should be open.
     */
    open: boolean;
    /**
     * Whether or not the Dropdown is readonly
     */
    readOnly: boolean;
    /**
     * `true` if the value is required.
     */
    required: boolean;
    /**
     * Specify whether the dropdown is fluid or not
     */
    isFluid: boolean;
    /**
     * The special validity message for `required`.
     */
    requiredValidityMessage: string;
    /**
     * Dropdown size.
     */
    size: DROPDOWN_SIZE;
    /**
     * The `aria-label` attribute for the UI indicating the closed state.
     */
    toggleLabelClosed: string;
    /**
     * The `aria-label` attribute for the UI indicating the open state.
     */
    toggleLabelOpen: string;
    /**
     * Generic label that will be used as the textual representation of what this field is for
     */
    label: string;
    /**
     * `true` if this dropdown should use the inline UI variant.
     */
    type: DROPDOWN_TYPE;
    /**
     * The validity message.
     */
    validityMessage: string;
    /**
     * The value of the selected item.
     */
    accessor value: string;
    /**
     * Specify whether the control is currently in warning state
     */
    warn: boolean;
    /**
     * Provide the text that is displayed when the control is in warning state
     */
    warnText: string;
    /**
     * The computed aria-label for the toggle button based on open state.
     */
    get toggleLabel(): string;
    shouldUpdate(changedProperties: any): boolean;
    updated(changedProperties: any): void;
    /**
     * Clears Floating UI styles when auto-align is off or the menu closes.
     */
    private _resetFloatingStyles;
    /**
     * Runs Floating UI placement while auto-align is active.
     */
    private _updateAutoAlignPlacement;
    /**
     * Normalizes validation props based on disabled and readOnly states
     */
    protected get _normalizedProps(): {
        disabled: boolean;
        invalid: boolean;
        warn: boolean;
    };
    /**
     * The CSS class list for dropdown listbox
     */
    protected get _classes(): any;
    render(): TemplateResult<1>;
    /**
     * Symbols of keys that triggers opening/closing menu and selecting/deselecting menu item.
     */
    static TRIGGER_KEYS: Set<string>;
    /**
     * A selector that will return highlighted items.
     */
    static get selectorItemHighlighted(): string;
    /**
     * A selector that will return dropdown items.
     */
    static get selectorItem(): string;
    /**
     * A selector that will return selected items.
     */
    static get selectorItemSelected(): string;
    /**
     * The name of the custom event fired before a dropdown 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 dropdown item is selected upon a user gesture.
     */
    static get eventSelect(): string;
    /**
     * The name of the custom event fired before this dropdown item is being toggled upon a user gesture.
     * Cancellation of this event stops the user-initiated action of toggling this dropdown item.
     */
    static get eventBeforeToggle(): string;
    /**
     * The name of the custom event fired after this dropdown item is toggled upon a user gesture.
     */
    static get eventToggle(): string;
    /**
     * A selector that will return the slug item.
     *
     * remove in v12
     */
    static get slugItem(): string;
    /**
     * A selector that will return the AI Label item.
     */
    static get aiLabelItem(): string;
    static shadowRootOptions: {
        delegatesFocus: boolean;
        clonable?: boolean;
        customElementRegistry?: CustomElementRegistry;
        mode: ShadowRootMode;
        serializable?: boolean;
        slotAssignment?: SlotAssignmentMode;
    };
    static styles: any;
    /**
     * @returns A action for dropdown for the given key symbol.
     */
    static getAction(key: string): DROPDOWN_KEYBOARD_ACTION;
}
export default CDSDropdown;
//# sourceMappingURL=dropdown.d.ts.map