import { jsx as _jsx } from "react/jsx-runtime";
import cx from "classnames";
import { e } from "./comboboxBem.js";
import { useComboboxState } from "./UiComboboxContext.js";
/** @internal */
export function UiComboboxPopup({ style, className, children, ...htmlProps }) {
    const { isOpen, setFloatingRef, getFloatingProps, floatingStyles, availableOptions } = useComboboxState();
    if (!isOpen || availableOptions.length === 0) {
        return null;
    }
    return (_jsx("div", { ...getFloatingProps(htmlProps), ref: setFloatingRef, style: { ...style, ...floatingStyles }, className: cx(e("popup"), className), "data-open": isOpen, children: children }));
}
//# sourceMappingURL=UiComboboxPopup.js.map