import type { BlokkliIcon } from '#blokkli-build/icons'; import type { FormSearchItem } from './types.js'; export type { FormSearchItem }; type __VLS_Props = { /** Form `id` attribute, also used as `for=` on the label. */ id: string; /** Field label shown above the input. */ label?: string; /** Optional small description shown under the input. */ description?: string; /** Marks the field as required (asterisk + form validation). */ required?: boolean; /** Disables the input and prevents the dropdown from opening. */ disabled?: boolean; /** * Items to search/render. In `'fzf'` mode this is the full candidate * list; in `'async'` mode it should already be filtered by the caller. */ items: FormSearchItem[]; /** Input placeholder. */ placeholder?: string; /** Leading icon. Defaults to `bk_mdi_search`. */ icon?: BlokkliIcon; /** Async-only: shows a spinner inside the input while truthy. */ loading?: boolean; /** Render results as a flat list with no group headers. */ disableGrouping?: boolean; /** * `'fzf'` (default) — component runs `Fzf` over `items` itself, populates * `positions` for each match, and shows the full list (locale-sorted) when * the query is empty. * * `'async'` — component renders `items` as-is, with no internal filtering. */ mode?: 'fzf' | 'async'; /** * Custom selector for fzf. Defaults to `(item) => item.label`. */ fzfSelector?: (item: FormSearchItem) => string; /** * When set, the component renders a "selected" chip (label + clear * button) instead of the search input. The clear button emits `clear` * so the consumer can reset its own state and switch back to search * mode. Useful for select-style consumers (e.g. picking a single link). */ selectedLabel?: string; }; type __VLS_ModelProps = { 'query'?: string; }; type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps; declare var __VLS_21: { item: any; isFocused: boolean; query: string; }; type __VLS_Slots = {} & { default?: (props: typeof __VLS_21) => any; }; declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, { focus: () => void | undefined; select: () => void | undefined; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { select: (args_0: FormSearchItem) => any; clear: () => any; "update:query": (value: string) => any; }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{ onSelect?: ((args_0: FormSearchItem) => any) | undefined; onClear?: (() => any) | undefined; "onUpdate:query"?: ((value: string) => any) | undefined; }>, { description: string; icon: BlokkliIcon; mode: "fzf" | "async"; placeholder: string; loading: boolean; selectedLabel: string; disableGrouping: boolean; fzfSelector: (item: FormSearchItem) => string; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>; declare const __VLS_export: __VLS_WithSlots; declare const _default: typeof __VLS_export; export default _default; type __VLS_WithSlots = T & { new (): { $slots: S; }; };