import{r as o,j as t}from"./vendor-react-C630P38J.js";import{S as p}from"./useBrandInfoByBrandNo-DQa2NbIq.js";import{x as E,ah as h}from"./feature-order-C2we0F5o.js";import{u as C}from"./vendor-i18n-D_F5k183.js";var N="_1cp98d60",R="_1cp98d61",_="_1cp98d62";const k=({searchTypeList:r,isMobile:v,customKeyInfo:s,isOnlyKeywordUsable:l,placeholder:c="검색어 입력",containerStyle:m,currentSearchTypeValue:u,currentSearchKeywordValue:d,onSearchChange:x})=>{const{t:j}=C(),f=l?u:(s==null?void 0:s.searchKeyword)??"searchKeyword",[a,i]=o.useState(()=>l?r.find(n=>n.value===f)??r[0]??null:r.find(n=>n.value===u)??r[0]??null),e=o.useRef(null);o.useEffect(()=>{if(l){i(r.find(n=>n.value===f)??r[0]??null);return}i(r.find(n=>n.value===u)??r[0]??null)},[f,u,l,r]),o.useEffect(()=>{e.current&&(e.current.value=d)},[d]);const S=n=>{n.preventDefault(),e.current&&x({searchType:(a==null?void 0:a.value)??"",searchKeyword:e.current.value??""})};return t.jsxs("form",{className:N,style:m,onSubmit:S,children:[t.jsx("div",{className:R,children:t.jsx(E,{isMobile:v,options:r,value:a,onChange:i})}),t.jsxs("div",{className:_,children:[t.jsx(h,{ref:e,placeholder:j(c)}),t.jsx("button",{children:t.jsx(p,{})})]})]})};export{k as L};