/*! ratio-ui · design system for knowledge sharing · https://github.com/losol/ratio-ui · (c) 2026 Losol AS · MPL-2.0 */
"use client";
import { jsx } from "react/jsx-runtime";
import { Autocomplete } from "react-aria-components";
//#region src/forms/Autocomplete/AutoComplete.tsx
/**
* AutoComplete component following React Aria patterns.
*
* A composable autocomplete that wraps a SearchField/TextField and a collection component
* (ListBox, Menu, etc.) to provide filtering and selection behavior.
*
* @example
* ```tsx
* // Async search pattern
* const list = useAsyncList({
*   async load({ filterText }) {
*     if (!filterText || filterText.length < 3) return { items: [] };
*     const results = await searchAPI(filterText);
*     return { items: results };
*   }
* });
*
* <AutoComplete
*   inputValue={list.filterText}
*   onInputChange={list.setFilterText}
*   isLoading={list.isLoading}
* >
*   <SearchField label="Search" placeholder="Type to search..." />
*   <ListBox items={list.items} renderEmptyState={() => 'No results'}>
*     {(item) => <ListBoxItem>{item.name}</ListBoxItem>}
*   </ListBox>
* </AutoComplete>
* ```
*
* @see https://react-aria.adobe.com/Autocomplete.html
*/
function AutoComplete({ children, inputValue, onInputChange, filter, disableAutoFocusFirst = false, disableVirtualFocus = false }) {
	return /* @__PURE__ */ jsx(Autocomplete, {
		inputValue,
		onInputChange,
		filter,
		disableAutoFocusFirst,
		disableVirtualFocus,
		children
	});
}
//#endregion
export { AutoComplete };

//# sourceMappingURL=AutoComplete.js.map