import{e}from"./vendor-element-plus.js?ver=3.1.0";import{_ as o,I as s}from"./fc-bits-ui.js?ver=3.1.0";import{r as a,a as l,o as t,w as d,b as i,d as r,aB as n}from"./vendor.js?ver=3.1.0";const m={props:{modelValue:{type:String,default:""},disabled:Boolean,placeholder:String},name:"Searcher",emits:["update:modelValue"],components:{Icons:s},data(){return{model:this.modelValue||"",timeout:null}},methods:{fire(){this.model&&(this.doAction("loading",!0),this.doAction("search-subscribers",this.model))}},watch:{modelValue(e){this.model=e||""},model:function(e,o){this.$emit("update:modelValue",e||""),e=(e||"").trim(),(o=(o||"").trim())&&!e&&(this.doAction("loading",!0),this.doAction("search-subscribers",this.model))},disabled(e){e&&(this.model="")}}},c={class:"icon"};const u=o(m,[["render",function(o,s,m,u,h,p){const f=a("Icons"),b=e;return t(),l(b,{size:"small",modelValue:h.model,"onUpdate:modelValue":s[0]||(s[0]=e=>h.model=e),onClear:p.fire,disabled:m.disabled,onKeyup:n(p.fire,["enter"]),placeholder:m.placeholder||o.$t("Search contacts"),autofocus:""},{prefix:d(()=>[i("span",c,[r(f,{"icon-name":"search"})])]),_:1},8,["modelValue","onClear","disabled","onKeyup","placeholder"])}]]);export{u as S};
