import { jsx as _jsx } from "react/jsx-runtime";
import { UiComboboxContextProvider } from "./UiComboboxContext.js";
import { useCombobox } from "./useCombobox.js";
/**
 * A composable combobox component that enables users to select from a filtered list of options.
 *
 * @internal
 *
 * @example
 *
 * ```tsx
 * import { UiCombobox, UiComboboxInput, UiComboboxList, UiComboboxPopup } from "@gooddata/sdk-ui-kit";
 *
 * const options = [
 *     { id: "apple", label: "Apple" },
 *     { id: "banana", label: "Banana" },
 *     { id: "apricot", label: "Apricot" },
 * ];
 *
 * <UiCombobox options={options}>
 *     <UiComboboxInput placeholder="Select a fruit..." />
 *     <UiComboboxPopup>
 *         <UiComboboxList />
 *     </UiComboboxPopup>
 * </UiCombobox>
 * ```
 */
export function UiCombobox({ children, ...props }) {
    const state = useCombobox(props);
    return _jsx(UiComboboxContextProvider, { state: state, children: children });
}
