"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const React = require("react");
require("clsx");
const useProps = require("../../../core/MantineProvider/use-props/use-props.cjs");
const Box = require("../../../core/Box/Box.cjs");
const factory = require("../../../core/factory/factory.cjs");
const Combobox_context = require("../Combobox.context.cjs");
const Combobox_module_css = require("../Combobox.module.css.cjs");
const useId = require("../../../../../../../../@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-id/use-id.cjs");
const defaultProps = {};
const ComboboxOptions = factory.factory((_props, ref) => {
  const props = useProps.useProps("ComboboxOptions", defaultProps, _props);
  const { classNames, className, style, styles, id, onMouseDown, labelledBy, ...others } = props;
  const ctx = Combobox_context.useComboboxContext();
  const _id = useId.useId(id);
  React.useEffect(() => {
    ctx.store.setListId(_id);
  }, [_id]);
  return /* @__PURE__ */ jsxRuntime.jsx(
    Box.Box,
    {
      ref,
      ...ctx.getStyles("options", { className, style, classNames, styles }),
      ...others,
      id: _id,
      role: "listbox",
      "aria-labelledby": labelledBy,
      onMouseDown: (event) => {
        event.preventDefault();
        onMouseDown == null ? void 0 : onMouseDown(event);
      }
    }
  );
});
ComboboxOptions.classes = Combobox_module_css.default;
ComboboxOptions.displayName = "@mantine/core/ComboboxOptions";
exports.ComboboxOptions = ComboboxOptions;
