import { jsx } from "react/jsx-runtime";
import { isElement } from "../../../core/utils/is-element/is-element.mjs";
import "react";
import "clsx";
import { useProps } from "../../../core/MantineProvider/use-props/use-props.mjs";
import { factory } from "../../../core/factory/factory.mjs";
import { Popover } from "../../Popover/Popover.mjs";
import { useComboboxContext } from "../Combobox.context.mjs";
const defaultProps = {
  refProp: "ref"
};
const ComboboxDropdownTarget = factory((props, ref) => {
  const { children, refProp } = useProps("ComboboxDropdownTarget", defaultProps, props);
  useComboboxContext();
  if (!isElement(children)) {
    throw new Error(
      "Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
    );
  }
  return /* @__PURE__ */ jsx(Popover.Target, { ref, refProp, children });
});
ComboboxDropdownTarget.displayName = "@mantine/core/ComboboxDropdownTarget";
export {
  ComboboxDropdownTarget
};
