import { EventEmitter } from '../../stencil-public-runtime';
import type { MultiselectOption, MultiselectChangeEventDetail, MultiselectSearchEventDetail, MultiselectLoadOptionsEventDetail, MultiselectCreateEventDetail } from './multiselect-interface';
/**
 * @slot (default) - Static option elements for the multiselect
 * @slot empty - Custom empty state message when no options match
 * @slot loading - Custom loading indicator
 * @part trigger - The trigger surface that opens the dropdown panel
 * @part pill-toggle - The chevron button inside the inline pill trigger
 */
export declare class PdsMultiselect {
    private triggerEl?;
    private pillInlineTriggerEl?;
    private searchInputEl?;
    private containerEl?;
    private listboxEl?;
    private panelEl?;
    private internals?;
    private abortController?;
    private fetchDebounceTimer?;
    private fetchTimeoutTimer?;
    private observer?;
    private cleanupAutoUpdate?;
    el: HTMLPdsMultiselectElement;
    /**
     * A unique identifier used for the underlying component `id` attribute.
     */
    componentId: string;
    /**
     * Text to be displayed as the multiselect label.
     */
    label?: string;
    /**
     * Placeholder text for the input field.
     */
    placeholder?: string;
    /**
     * Placeholder text for the search input inside the dropdown panel.
     * @default 'Find...'
     */
    searchPlaceholder: string;
    /**
     * Whether to close the panel after an option is selected.
     * Defaults to `false` (panel stays open for multi-select).
     */
    closePanelOnSelect: boolean;
    /**
     * Specifies the name. Submitted with the form as part of a name/value pair.
     */
    name?: string;
    /**
     * Array of selected option values.
     */
    value: string[];
    /**
     * Determines whether or not the multiselect is disabled.
     */
    disabled: boolean;
    /**
     * URL endpoint for async data fetching.
     */
    asyncUrl?: string;
    /**
     * HTTP method for async requests.
     */
    asyncMethod: 'GET' | 'POST';
    /**
     * Debounce delay in milliseconds for search/fetch.
     */
    debounce: number;
    /**
     * Timeout in milliseconds for async fetch requests.
     */
    fetchTimeout: number;
    /**
     * Maximum number of selections allowed.
     */
    maxSelections?: number;
    /**
     * Maximum height of the dropdown before scrolling.
     */
    maxHeight: string;
    /**
     * Width of the trigger button (and reference for dropdown positioning).
     */
    triggerWidth: string;
    /**
     * Minimum width of the dropdown panel.
     */
    minWidth: string;
    /**
     * Width of the dropdown panel. Defaults to the trigger width.
     */
    panelWidth?: string;
    /**
     * Visually hides the label but keeps it accessible.
     */
    hideLabel: boolean;
    /**
     * Hides the selected items summary section in the dropdown panel.
     */
    hideSelectedItems: boolean;
    /**
     * Display mode for selected items outside the dropdown panel.
     * `'count'` shows "N item(s)" text in the trigger (default). `'pill'` renders
     * selected items as dismissible pds-chip tags.
     * @default 'count'
     */
    selectedDisplay: 'count' | 'pill';
    /**
     * Position of pill chips when `selectedDisplay` is `'pill'`.
     * `'inline'` places chips inside the trigger; `'below'` places chips in a
     * flex-wrap row directly below the trigger.
     * @default 'inline'
     */
    pillPosition: 'inline' | 'below';
    /**
     * Maximum chips shown inline before collapsing to a "+N more" badge.
     * Only applies when `selectedDisplay='pill'` and `pillPosition='inline'`.
     * @default 3
     */
    maxInlinePills: number;
    /**
     * Error message to display.
     */
    errorMessage?: string;
    /**
     * Helper message to display below the input.
     */
    helperMessage?: string;
    /**
     * If true, the multiselect is in an invalid state.
     */
    invalid?: boolean;
    /**
     * If true, the multiselect is required.
     */
    required: boolean;
    /**
     * Whether the component is currently loading async options.
     */
    loading: boolean;
    /**
     * Options provided externally (for consumer-managed async).
     * When using `group` on options, keep each group block contiguous in the array.
     * The same `group` label appearing again after other items produces a separate header (same as native `<optgroup>`).
     */
    options?: MultiselectOption[];
    /**
     * Function to format async results. Receives raw API response item.
     */
    formatResult?: (item: unknown) => MultiselectOption;
    /**
     * URL endpoint for creating new options. When set, shows "Add" option when no matches found.
     */
    createUrl?: string;
    /**
     * CSRF token for authenticated requests. If not provided, attempts to read from meta tag.
     */
    csrfToken?: string;
    /**
     * CSRF header name for authenticated requests. Defaults to `X-CSRF-Token`.
     */
    csrfHeaderName?: string;
    isOpen: boolean;
    searchQuery: string;
    highlightedIndex: number;
    internalOptions: MultiselectOption[];
    selectedItems: MultiselectOption[];
    currentPage: number;
    hasMore: boolean;
    creating: boolean;
    private removalAnnouncement;
    private isOpening;
    private isClosingViaSelection;
    private initialAsyncFetchTriggered;
    private pendingUnresolvedFetch;
    /**
     * Emitted when selection changes.
     */
    pdsMultiselectChange: EventEmitter<MultiselectChangeEventDetail>;
    /**
     * Emitted on search input (for consumer-managed async).
     */
    pdsMultiselectSearch: EventEmitter<MultiselectSearchEventDetail>;
    /**
     * Emitted to request more options (pagination).
     */
    pdsMultiselectLoadOptions: EventEmitter<MultiselectLoadOptionsEventDetail>;
    /**
     * Emitted when a new option is created.
     */
    pdsMultiselectCreate: EventEmitter<MultiselectCreateEventDetail>;
    /**
     * Emitted when the dropdown is dismissed via Escape key or click outside.
     *
     * This event fires only when the user explicitly dismisses the panel without making a selection:
     * - ✅ Fires: Pressing Escape key while dropdown is open
     * - ✅ Fires: Clicking outside the component while dropdown is open
     * - ❌ Does NOT fire: When panel closes due to selection (including when `closePanelOnSelect` is true)
     * - ❌ Does NOT fire: When panel closes programmatically via `closeDropdown()`
     *
     * Equivalent to Sage's `onEscapeHook`. Use this to restore parent UI state or run cleanup when the user cancels their interaction.
     */
    pdsMultiselectDismiss: EventEmitter<void>;
    private originalSearchEmitter?;
    connectedCallback(): void;
    componentWillLoad(): void;
    componentDidLoad(): void;
    private setupSlotChangeListener;
    disconnectedCallback(): void;
    protected setupDebounce(): void;
    protected valueChanged(newValue: string[] | string): void;
    protected optionsChanged(): void;
    protected internalOptionsChanged(): void;
    /**
     * Sets focus on the trigger button.
     */
    setFocus(): Promise<void>;
    /**
     * Clears all selected values and resets the component.
     */
    clear(): Promise<void>;
    /**
     * Handle global keyboard events for accessibility.
     * Closes dropdown on Escape key press regardless of focus location.
     */
    handleWindowKeyDown(event: KeyboardEvent): void;
    private setupMutationObserver;
    private updateOptionsFromSlot;
    private clearAsyncFetchState;
    private debouncedFetchAsyncOptions;
    private syncSelectedItems;
    private ensureValueArray;
    private getAllOptions;
    private getFilteredOptions;
    private updateFormValue;
    private getCsrfToken;
    private fetchOptions;
    private createOption;
    private handleTriggerClick;
    private handleTriggerKeyDown;
    private handleSearchInputChange;
    private handleSearchInputKeyDown;
    private handleContainerFocusOut;
    private openDropdown;
    private closeDropdown;
    private positionDropdown;
    private scrollOptionIntoView;
    private toggleOption;
    private selectOption;
    private handleOptionMouseDown;
    private handleOptionMouseEnter;
    private handleScroll;
    private getGroupedRenderItems;
    private renderOption;
    private renderSelectedItemsList;
    private renderDropdown;
    private handlePillRemove;
    private renderInlinePills;
    private renderBelowPills;
    private getTriggerText;
    render(): any;
}
