import { jsx as s } from "react/jsx-runtime";
import { useState as n, useEffect as c } from "react";
import { useDebouncedValue as u } from "../hooks/useDebounce.js";
import { c as l } from "../index-20bzTFSx.js";
import { cn as f } from "../utils/functions.js";
import "../utils/components/RenderEach.js";
import "../utils/components/RenderIf.js";
import "../components/Icons.js";
import "../clsx-7d8NmkQq.js";
import "../components/Inputs/variants.js";
import "../index-xVF7D3FM.js";
import "../motion-dVICNqWI.js";
import "../SVGVisualElement-aqO4D4Z5.js";
import "../LayoutGroupContext-3euHzeKi.js";
const h = ({ placeholder: r, callBack: a, className: m }) => {
  const [o, t] = n(""), { _value: e, loading: i } = u({ value: o, wait: 1e3, options: { leading: !1 } });
  return c(() => {
    a(e);
  }, [e]), /* @__PURE__ */ s(
    l,
    {
      className: f("_w-full", m),
      placeholder: r,
      value: o,
      isSearching: i,
      onChange: (p) => t(p.target.value),
      onCancel: () => t("")
    }
  );
}, V = {
  InputSearch: h
};
export {
  V as default
};
