"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
require("react");
require("clsx");
const useProps = require("../../../core/MantineProvider/use-props/use-props.cjs");
const factory = require("../../../core/factory/factory.cjs");
const Input = require("../../Input/Input.cjs");
const Combobox_context = require("../Combobox.context.cjs");
const useComboboxTargetProps = require("../use-combobox-target-props/use-combobox-target-props.cjs");
const Combobox_module_css = require("../Combobox.module.css.cjs");
const useMergedRef = require("../../../../../../../../@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-merged-ref/use-merged-ref.cjs");
const defaultProps = {
  withAriaAttributes: true,
  withKeyboardNavigation: true
};
const ComboboxSearch = factory.factory((_props, ref) => {
  const props = useProps.useProps("ComboboxSearch", defaultProps, _props);
  const {
    classNames,
    styles,
    unstyled,
    vars,
    withAriaAttributes,
    onKeyDown,
    withKeyboardNavigation,
    size,
    ...others
  } = props;
  const ctx = Combobox_context.useComboboxContext();
  const _styles = ctx.getStyles("search");
  const targetProps = useComboboxTargetProps.useComboboxTargetProps({
    targetType: "input",
    withAriaAttributes,
    withKeyboardNavigation,
    withExpandedAttribute: false,
    onKeyDown,
    autoComplete: "off"
  });
  return /* @__PURE__ */ jsxRuntime.jsx(
    Input.Input,
    {
      ref: useMergedRef.useMergedRef(ref, ctx.store.searchRef),
      classNames: [{ input: _styles.className }, classNames],
      styles: [{ input: _styles.style }, styles],
      size: size || ctx.size,
      ...targetProps,
      ...others,
      __staticSelector: "Combobox"
    }
  );
});
ComboboxSearch.classes = Combobox_module_css.default;
ComboboxSearch.displayName = "@mantine/core/ComboboxSearch";
exports.ComboboxSearch = ComboboxSearch;
