/**
 * @file BaseTypeahead.tsx
 * @input Uses React, StyleX, usePopover, TypeaheadItem
 * @output Exports BaseTypeahead combobox engine component
 * @position Core implementation; used by Typeahead and Tokenizer
 *
 * Pure combobox engine: input, search, keyboard navigation, dropdown.
 * No wrapper div, no border styling, no token rendering.
 * Consumers provide their own wrapper and pass anchorRef for dropdown positioning.
 *
 * SYNC: When modified, update:
 * - /packages/core/src/Typeahead/index.ts
 * - /packages/cli/assets/templates/blocks/components/Typeahead/ (showcase blocks)
 */
import React, { type ReactNode, type RefObject } from 'react';
import type { StyleXStyles } from '@stylexjs/stylex';
import type { BaseProps } from '../BaseProps';
import type { SearchableItem, SearchSource } from './types';
export interface BaseTypeaheadProps<T extends SearchableItem> extends Omit<BaseProps<HTMLElement>, 'onChange'> {
    ref?: React.Ref<HTMLInputElement>;
    /**
     * Search source providing items.
     */
    searchSource: SearchSource<T>;
    /**
     * Currently selected item (null = nothing selected).
     */
    value: T | null;
    /**
     * Callback when selection changes.
     */
    onChange: (item: T | null) => void;
    /**
     * Render function for dropdown items. Default: TypeaheadItem.
     */
    renderItem?: (item: T) => ReactNode;
    /**
     * Placeholder text.
     */
    placeholder?: string;
    /**
     * Show results on focus before typing.
     * @default false
     */
    hasEntriesOnFocus?: boolean;
    /**
     * Max dropdown items to display.
     * @default 10
     */
    maxMenuItems?: number;
    /**
     * Text shown when no results found.
     * @default 'No results found'
     */
    emptySearchResultsText?: string;
    /**
     * Whether the input is disabled.
     * @default false
     */
    isDisabled?: boolean;
    /**
     * When disabled with a reason, keeps the input focusable via `aria-disabled`
     * (instead of the native `disabled` attribute) and `readOnly` so an
     * associated disabled-reason tooltip stays discoverable by keyboard and
     * assistive technology. Value mutation is still blocked by the `isDisabled`
     * guards. Consumers (Typeahead) own the tooltip and wrapper.
     * @default false
     */
    isFocusableDisabled?: boolean;
    /**
     * Auto-focus on mount.
     * @default false
     */
    hasAutoFocus?: boolean;
    /**
     * Query change callback (for logging/external use).
     */
    onChangeQuery?: (query: string) => void;
    /**
     * Callback when dropdown opens/closes.
     */
    onOpenChange?: (isOpen: boolean) => void;
    /**
     * Debounce delay in ms before triggering search after typing.
     * Set to 0 for synchronous/local search sources that don't need debouncing.
     * @default 150
     */
    debounceMs?: number;
    /**
     * ID for the input element (for label association).
     */
    inputId?: string;
    /**
     * Additional aria-describedby IDs.
     */
    ariaDescribedBy?: string;
    /**
     * Additional aria-labelledby IDs.
     */
    ariaLabelledBy?: string;
    /**
     * Additional StyleX styles for the input element.
     */
    inputXStyle?: StyleXStyles;
    /**
     * Tab-order override for the input element. Typeahead passes `-1` while
     * its selected-value token is shown: the input is visually collapsed
     * (width 0 / opacity 0) but must stay programmatically focusable for
     * token edit/clear interactions, so removing it from the Tab order is
     * what prevents an invisible tab stop (WCAG 2.4.3 / 2.4.7). The input
     * remains focusable via `.focus()` regardless of this value.
     */
    inputTabIndex?: number;
    /**
     * Ref to the anchor element for dropdown positioning.
     * The dropdown will be positioned relative to this element.
     * If not provided, the input itself is used as the anchor.
     */
    anchorRef?: RefObject<HTMLElement | null>;
    /**
     * Additional keydown handler called before internal keyboard navigation.
     * If the handler calls `e.preventDefault()`, internal handling is skipped.
     */
    onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
    /**
     * Size of the typeahead, used to scale dropdown item padding.
     * When 'sm', items get compact padding to match the trigger size.
     * @default 'md'
     */
    size?: 'sm' | 'md' | 'lg';
}
/**
 * Combobox engine: input, search, keyboard navigation, and dropdown.
 *
 * Renders only the `<input>` and the dropdown popover. No wrapper div,
 * no border styling, no token rendering. Consumers (Typeahead,
 * Tokenizer) provide their own wrapper and pass `anchorRef` for
 * dropdown positioning.
 *
 * @example
 * ```
 * <BaseTypeahead
 *   searchSource={source}
 *   value={selected}
 *   onChange={setSelected}
 *   anchorRef={wrapperRef}
 *   placeholder="Search..."
 * />
 * ```
 */
export declare const BaseTypeahead: <T extends SearchableItem>(props: BaseTypeaheadProps<T>) => React.ReactElement;
//# sourceMappingURL=BaseTypeahead.d.ts.map