import{e}from"./vendor-element-plus.js?ver=3.1.10";import{aQ as o,W as s,Y as a,a5 as l,Z as t,ab as d,b2 as i}from"./vendor.js?ver=3.1.10";import{_ as r,I as n}from"./fc-bits-ui.js?ver=3.1.10";const m={props:{modelValue:{type:String,default:""},disabled:Boolean,placeholder:String},name:"Searcher",emits:["update:modelValue"],components:{Icons:n},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=r(m,[["render",function(r,n,m,u,h,p){const b=o("Icons"),f=e;return s(),a(f,{size:"small",modelValue:h.model,"onUpdate:modelValue":n[0]||(n[0]=e=>h.model=e),onClear:p.fire,disabled:m.disabled,onKeyup:i(p.fire,["enter"]),placeholder:m.placeholder||r.$t("Search contacts"),autofocus:""},{prefix:l(()=>[t("span",c,[d(b,{"icon-name":"search"})])]),_:1},8,["modelValue","onClear","disabled","onKeyup","placeholder"])}]]);export{u as S};
