import{N as v,l as h}from"./index-BTglIPU2.js?v=1773287522785";import{k as x,r as k,$ as y,a8 as w,au as B,a9 as r,_ as i,a0 as l,s as C,ai as b,X as g,S as N}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{b as R}from"./naive-ui--dJnpVcV.js?v=1773287522785";const z=x({__name:"index",props:{value:{default:""},width:{default:240},prefix:{type:Boolean,default:!1}},emits:["search","update:value"],setup(u,{expose:c,emit:p}){const f=u,n=k(null);c({focus:()=>{var e;(e=n.value)==null||e.focus()}});const m=p,s=v(f,"value"),a=()=>{m("search",s.value)};return(e,t)=>{const o=h,_=R;return y(),w(_,C({value:N(s),"onUpdate:value":t[0]||(t[0]=d=>g(s)?s.value=d:null)},e.$attrs,{ref_key:"inputRef",ref:n,class:"bt-search",style:{width:"".concat(e.width,"px")},onKeyup:b(a,["enter"])}),B({_:2},[e.prefix?{name:"prefix",fn:r(()=>[i("div",{class:"flex items-center cursor-pointer",onClick:a},[l(o,{name:"search",size:"16"})])]),key:"0"}:void 0,e.prefix?void 0:{name:"suffix",fn:r(()=>[i("div",{class:"flex items-center cursor-pointer",onClick:a},[l(o,{name:"search",size:"16"})])]),key:"1"}]),1040,["value","style"])}}});export{z as _};
