import{_ as e}from"./page_layout.js?v=1753954525509";import{k as a,r as s,af as t,U as r,a1 as n,ax as l,a2 as o,W as i,Q as u,s as c,at as f,X as p,ah as v}from"./vue.js?v=1753954525509";import{aq as m}from"./naive.js?v=1753954525509";const d=a({__name:"index",props:{value:{default:""},width:{default:240},prefix:{type:Boolean,default:!1}},emits:["search","update:value"],setup(a,{expose:d,emit:x}){const h=a,y=s(null);d({focus:()=>{var e;null==(e=y.value)||e.focus()}});const _=x,k=t(h,"value"),j=()=>{_("search",k.value)};return(a,s)=>{const t=e,d=m;return r(),n(d,c({value:p(k),"onUpdate:value":s[0]||(s[0]=e=>v(k)?k.value=e:null)},a.$attrs,{ref_key:"inputRef",ref:y,class:"bt-search",style:{width:"".concat(a.width,"px")},onKeyup:f(j,["enter"])}),l({_:2},[a.prefix?{name:"prefix",fn:o((()=>[i("div",{class:"flex items-center cursor-pointer",onClick:j},[u(t,{name:"search",size:"16"})])])),key:"0"}:void 0,a.prefix?void 0:{name:"suffix",fn:o((()=>[i("div",{class:"flex items-center cursor-pointer",onClick:j},[u(t,{name:"search",size:"16"})])])),key:"1"}]),1040,["value","style"])}}});export{d as _};
