System.register(["./index-legacy-aaec755a.js","./index-legacy-69c33129.js"],(function(e,c){"use strict";var l,a,t,n,o,r,s,i,u,d,b,f,h,g,k;return{setters:[e=>{l=e.f,a=e.F},e=>{t=e.y,n=e.a5,o=e.D,r=e.G,s=e.d,i=e.ad,u=e.I,d=e.ac,b=e.a,f=e.ay,h=e.H,g=e.aE,k=e.w}],execute:function(){const[c,p,v]=t("search"),I=n({},l,{label:String,shape:o("square"),leftIcon:o("search"),clearable:r,actionText:String,background:String,showAction:Boolean});var m=s({name:c,props:I,emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:c,slots:t,attrs:o}){const r=i(),s=u(),k=()=>{t.action||(c("update:modelValue",""),c("cancel"))},I=l=>{13===l.keyCode&&(g(l),c("search",e.modelValue))},m=()=>e.id||`${r}-input`,y=()=>{if(t.label||e.label)return b("label",{"class":p("label"),"for":m()},[t.label?t.label():e.label])},w=()=>{if(e.showAction){const c=e.actionText||v("cancel");return b("div",{"class":p("action"),role:"button",tabindex:0,onClick:k},[t.action?t.action():c])}},x=e=>c("blur",e),C=e=>c("focus",e),S=e=>c("clear",e),V=e=>c("clickInput",e),j=e=>c("clickLeftIcon",e),A=e=>c("clickRightIcon",e),L=Object.keys(l),R=()=>{const l=n({},o,f(e,L),{id:m()});return b(a,h({ref:s,type:"search","class":p("field",{"with-message":l.errorMessage}),border:!1,onBlur:x,onFocus:C,onClear:S,onKeypress:I,onClickInput:V,onClickLeftIcon:j,onClickRightIcon:A,"onUpdate:modelValue":e=>c("update:modelValue",e)},l),f(t,["left-icon","right-icon"]))};return d({focus:()=>{var e;return null==(e=s.value)?void 0:e.focus()},blur:()=>{var e;return null==(e=s.value)?void 0:e.blur()}}),()=>{var c;return b("div",{"class":p({"show-action":e.showAction}),style:{background:e.background}},[null==(c=t.left)?void 0:c.call(t),b("div",{"class":p("content",e.shape)},[y(),R()]),w()])}}});e("S",k(m))}}}));
