import { EventEmitter } from '../../stencil-public-runtime';
import type { BasePdsProps } from "../../utils/interfaces";
import type { ChipSentimentType } from "../../utils/types";
import type { ComboboxOption, ComboboxSearchEventDetail, ComboboxLoadOptionsEventDetail } from './combobox-interface';
/**
 * @slot option - Option elements for the combobox dropdown
 * @slot trigger-content - Custom content for the button trigger when customTriggerContent is true
 * @slot empty - Custom empty state message when no options match
 * @slot loading - Custom loading indicator
 */
export declare class PdsCombobox implements BasePdsProps {
    /** Reference to the host element */
    el: HTMLPdsComboboxElement;
    /**
     * A unique identifier used for the underlying component `id` attribute.
     */
    componentId: string;
    /**
     * The name of the form control. Submitted with the form as part of a name/value pair.
     */
    name?: string;
    /**
     * Enable custom layout content for options. Options with data-layout attribute will render their HTML content.
     * ⚠️ Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content.
     * @default false
     */
    customOptionLayouts: boolean;
    /**
     * Enable custom layout content for the button trigger via the trigger-content slot.
     * When true, uses slot content for initial state but updates dynamically with selected option layout.
     * ⚠️ Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content.
     * @default false
     */
    customTriggerContent: boolean;
    /**
     * If true, the combobox is disabled.
     */
    disabled: boolean;
    /**
     * Placement of the dropdown relative to the trigger.
     * @default 'bottom-start'
     */
    dropdownPlacement: 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
    /**
     * Width of the dropdown. Any valid CSS width value.
     * @default '236px'
     */
    dropdownWidth: string;
    /**
     * Where to mount the dropdown listbox (`host` or `body`, sometimes called “append to body”).
     * Use `body` inside scrollable containers (for example modals) so the list is not clipped by
     * `overflow: hidden` ancestors. The portal is appended to the nearest `<dialog>` when present
     * (including `pds-modal` / `showModal()`), using a composed ascent so shadow DOM and slot
     * boundaries do not hide the dialog from discovery; otherwise it is appended to `document.body`.
     * Keyboard focus remains on the trigger via
     * `aria-activedescendant` so modal focus traps continue to work. Custom `empty` and `loading`
     * slots are not supported when `body` is used; the default empty and loading content is shown instead.
     * @default 'host'
     */
    dropdownMount: 'host' | 'body';
    /**
     * Visually hides the label text for instances where only the combobox should be displayed.
     * The visible `<label>` is omitted (same pattern as `pds-select`) so label spacing does not reserve layout;
     * the trigger uses `aria-label` so the name stays available to assistive technology.
     */
    hideLabel: boolean;
    /**
     * Text to be displayed as the combobox label.
     */
    label?: string;
    /**
     * Maximum height of the dropdown. Can be any valid CSS height value (e.g., '200px', '10rem').
     * When content exceeds this height, the dropdown will scroll.
     */
    maxHeight?: string;
    /**
     * Determines the combobox mode: 'filter' (filter options as you type) or 'select-only' (show all options).
     * In filter mode, reopening the menu while the input still shows the label of the selected option temporarily lists
     * all options until you type (so you can switch to a different choice without clearing the field first).
     * @default 'filter'
     */
    mode: 'filter' | 'select-only';
    /**
     * Placeholder text for the input field.
     */
    placeholder?: string;
    /**
     * Determines the combobox trigger: 'input' (editable input), 'button' (button-like, non-editable), or 'chip' (chip-like, non-editable).
     * @default 'input'
     */
    trigger: 'input' | 'button' | 'chip';
    /**
     * Width of the trigger (button or input). Any valid CSS width value.
     * @default 'fit-content'
     */
    triggerWidth: string;
    /**
     * The visual variant for the button trigger. Matches Pine button variants.
     * @default 'secondary'
     */
    triggerVariant: 'secondary' | 'primary' | 'accent' | 'destructive';
    /**
     * The shape of the button trigger. Use 'input' to render the trigger with input-like styling
     * (subtle border radius, input height) for use in form or filter rows alongside PdsSelect and PdsMultiselect.
     * @default 'pill'
     */
    triggerShape: 'pill' | 'input';
    /**
     * The sentiment for the chip trigger. Matches Pine chip sentiments.
     * @default 'neutral'
     */
    chipSentiment: ChipSentimentType;
    /**
     * Whether the chip trigger should be displayed in a larger size.
     * @default false
     */
    chipLarge: boolean;
    /**
     * The name of the icon to display in the chip trigger.
     */
    chipIcon?: string;
    /**
     * Whether a dot should be displayed on the chip trigger.
     * @default false
     */
    chipDot: boolean;
    /**
     * The value of the combobox input.
     */
    value: string;
    /**
     * 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;
    /**
     * Whether the component is currently loading async options.
     */
    loading: boolean;
    /**
     * Options provided externally (for consumer-managed async).
     */
    options?: ComboboxOption[];
    /**
     * Function to format async results. Receives raw API response item.
     */
    formatResult?: (item: unknown) => ComboboxOption;
    /**
     * Emitted when the value changes.
     */
    pdsComboboxChange: EventEmitter<{
        value: string;
    }>;
    /**
     * Emitted on search input (for consumer-managed async).
     */
    pdsComboboxSearch: EventEmitter<ComboboxSearchEventDetail>;
    /**
     * Emitted to request more options (pagination).
     */
    pdsComboboxLoadOptions: EventEmitter<ComboboxLoadOptionsEventDetail>;
    /**
     * Internal state for the display text shown in the input/trigger
     */
    displayText: string;
    /**
     * Internal state for filtered options and group labels
     */
    filteredItems: (HTMLOptionElement | HTMLOptGroupElement | HTMLPdsTextElement)[];
    /**
     * Internal state for the currently highlighted option index
     */
    highlightedIndex: number;
    /**
     * Internal state for dropdown open/close
     */
    isOpen: boolean;
    /**
     * Internal state for the currently selected option
     */
    selectedOption: HTMLOptionElement | null;
    /**
     * Internal state for the sanitized layout content of the selected option
     */
    selectedOptionLayoutContent: string;
    /**
     * Internal state to track chip properties for automatic rendering
     */
    selectedOptionChipProps: any;
    /**
     * Internal state for async options.
     */
    internalOptions: ComboboxOption[];
    /**
     * Internal state for current page (pagination).
     */
    currentPage: number;
    /**
     * Internal state for hasMore (pagination).
     */
    hasMore: boolean;
    private inputEl?;
    private optionEls;
    private allItems;
    private triggerEl?;
    private listboxEl?;
    private portalEl;
    private cleanupPositionAutoUpdate?;
    private bodyPortalAutoUpdateActive;
    /** Deferred so portal teardown runs after Stencil reconciles `isOpen === false`. */
    private deferredPortalTeardownId?;
    private internals?;
    private isUpdatingFromSelection;
    private abortController?;
    private fetchDebounceTimer?;
    private fetchTimeoutTimer?;
    private observer?;
    private originalSearchEmitter?;
    /**
     * In filter mode, after choosing an option the input still shows the label and would
     * otherwise filter the list to matching substrings only. While this flag is true,
     * the list shows every option until the user types (then normal filtering applies).
     */
    private expandFilterListWhileOpen;
    connectedCallback(): void;
    componentWillLoad(): void;
    componentDidLoad(): void;
    disconnectedCallback(): void;
    componentDidRender(): void;
    protected isOpenChanged(isOpen: boolean): void;
    private get usesBodyPortal();
    private get listboxId();
    private optionDomId;
    protected setupDebounce(): void;
    protected optionsChanged(): void;
    handleValueChange(): void;
    handleSelectedOptionChange(): void;
    private updateFormValue;
    private clearAsyncFetchState;
    private debouncedFetchAsyncOptions;
    private fetchOptions;
    private updateOptionsFromAsync;
    private updateOptions;
    private getOptionLabel;
    private getOptionLayoutContent;
    private sanitizeHtml;
    private isOptionLayout;
    private isOptionChip;
    private getOptionChipProps;
    private isOptionSelected;
    private setSelectedOption;
    private filterOptions;
    private clearExpandFilterList;
    /**
     * When reopening the dropdown in filter mode with the input still showing the
     * committed selection label, show the full option list until the user edits the query.
     */
    private prepareExpandFilterListOnOpen;
    private positionDropdown;
    private openDropdownPositioning;
    private startBodyPortalAutoUpdate;
    private stopBodyPortalAutoUpdate;
    private getPortalMountRoot;
    /**
     * Resolves the native `<dialog>` to host the portaled listbox so it stays in the same top layer
     * as `showModal()`. `Element.closest('dialog')` stops at shadow boundaries and can miss a
     * dialog that only wraps slotted content; this walks assigned slots and shadow hosts, and
     * falls back to `pds-modal`'s dialog when the combobox lives inside that subtree.
     */
    private findNearestDialogForPortal;
    private ensureBodyPortal;
    private syncBodyPortal;
    private removeBodyPortal;
    private handleInput;
    private handleInputClick;
    private handleKeyDown;
    /**
     * Sets focus on the native input element.
     */
    setFocus(): Promise<void>;
    /**
     * Sets the initial highlighted index when dropdown opens.
     * If there's a selected option, highlight it. Otherwise, highlight the first option.
     */
    private setInitialHighlightedIndex;
    /**
     * Focus management helper - moves focus to the first option when dropdown opens
     */
    private focusFirstOption;
    /**
     * Focus management helper - actually focuses the first option when opened via arrow keys
     */
    private focusFirstOptionForArrowKeys;
    private isArrowKeyNavigationMode;
    /**
     * Focus management helper - updates visual state and scrolling for the currently highlighted option
     * Note: We don't actually focus the option to prevent focusout events that close the dropdown
     */
    private updateOptionFocus;
    /**
     * Updates aria-activedescendant on the trigger element
     */
    private updateAriaActiveDescendant;
    /**
     * Focus management helper - restores focus to the trigger element
     */
    private restoreFocusToTrigger;
    /**
     * Gets the value of the currently selected option.
     */
    getSelectedValue(): Promise<string | null>;
    private onOptionClick;
    private onOptionMouseEnter;
    private onOptionMouseDown;
    private onOptionKeyDown;
    private get selectedLabel();
    private get selectedLayoutContent();
    private get selectedHasLayout();
    private get selectedChipSentiment();
    private get selectedChipLarge();
    private get selectedChipIcon();
    private get selectedChipDot();
    private onButtonTriggerClick;
    private onButtonTriggerKeyDown;
    private onButtonTriggerKeyUp;
    private onComboboxFocusOut;
    private handleOptionClick;
    private handleScroll;
    private renderDropdown;
    private renderCaretIcon;
    private renderLayoutContent;
    private renderDefaultContent;
    private shouldShowLayoutContent;
    private getChipTriggerClass;
    private renderButtonTriggerContent;
    private renderChipTriggerContent;
    private renderSelectedOptionAsChip;
    private renderChipTriggerLayoutContent;
    private getModifiedLayoutContentForTrigger;
    private renderChipTriggerDefaultContent;
    private renderOptionChip;
    render(): any;
}
