const e=require(`./chunk-BcutgqC9.cjs`),t=require(`./utils-8yHOSEWy.cjs`),n=require(`./createLucideIcon-BDgzJx6F.cjs`),r=require(`./Button.cjs`),i=require(`./Input.cjs`);let a=require(`react`);a=e.n(a,1);let o=require(`react/jsx-runtime`);var s=n.t(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),c=a.default.forwardRef(({className:e,inputClassName:n,buttonClassName:c,onSearch:l,searchOnlyOnClick:u,buttonVariant:d,buttonChildren:f,showSearchButton:p,inputVariant:m,inputSize:h,placeholder:g,..._},v)=>{let[y,b]=a.default.useState(void 0),[x,S]=a.default.useState(!1);return(0,o.jsxs)(`div`,{className:t.t(`flex gap-0`,e),ref:v,children:[(0,o.jsxs)(`div`,{className:`relative w-full`,children:[(0,o.jsx)(i.Input,{..._,variant:m,type:`text`,className:n,onChange:e=>{b(e.target.value),u||l?.(e.target.value)},inputSize:h,onKeyDown:e=>{e.key===`Enter`&&l?.(y)},onFocus:()=>S(!0),onBlur:()=>S(!1)}),!x&&(y===``||!y)&&(0,o.jsxs)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none`,children:[f?null:(0,o.jsx)(s,{className:`h-4 w-4 text-primary-gray-500 dark:text-primary-gray-400 mr-2`}),(0,o.jsx)(`span`,{className:`text-primary-gray-500 dark:text-primary-gray-400`,children:g||`Search...`})]})]}),p===!1?null:(0,o.jsx)(r.Button,{variant:d||`icon`,className:c,padding:h,onClick:()=>{l?.(y)},children:f||(0,o.jsx)(s,{className:`stroke-2`})})]})});c.displayName=`Search`,Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
//# sourceMappingURL=input-search-B5EUCuIE.cjs.map