var e=Object.defineProperty,s=Object.defineProperties,a=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,t=(s,a,o)=>a in s?e(s,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[a]=o;import{a2 as r,bu as c,_ as i,d as p,X as u,c as m,e as b,y as f,f as d,h as y,k as v,j as g,i as k,u as j,z as O,p as C,b4 as h,aG as _,ab as w,g as E,Z as P,ap as S}from"./index-ip5gDR6L.js";import{u as T}from"./use-form-common-props-BwBs_jod.js";const B=r({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:c},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),z={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},M=p({name:"ElTag"}),$=p((x=((e,s)=>{for(var a in s||(s={}))n.call(s,a)&&t(e,a,s[a]);if(o)for(var a of o(s))l.call(s,a)&&t(e,a,s[a]);return e})({},M),s(x,a({props:B,emits:z,setup(e,{emit:s}){const a=e,o=T(),n=u("tag"),l=m(()=>{const{type:e,hit:s,effect:l,closable:t,round:r}=a;return[n.b(),n.is("closable",t),n.m(e||"primary"),n.m(o.value),n.m(l),n.is("hit",s),n.is("round",r)]}),t=e=>{s("close",e)},r=e=>{s("click",e)},c=e=>{var s,a,o;(null==(o=null==(a=null==(s=null==e?void 0:e.component)?void 0:s.subTree)?void 0:a.component)?void 0:o.bum)&&(e.component.subTree.component.bum=null)};return(e,s)=>e.disableTransitions?(d(),b("span",{key:0,class:k(j(l)),style:E({backgroundColor:e.color}),onClick:r},[y("span",{class:k(j(n).e("content"))},[g(e.$slots,"default")],2),e.closable?(d(),f(j(w),{key:0,class:k(j(n).e("close")),onClick:_(t,["stop"])},{default:O(()=>[C(j(h))]),_:1},8,["class","onClick"])):v("v-if",!0)],6)):(d(),f(P,{key:1,name:`${j(n).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:c},{default:O(()=>[y("span",{class:k(j(l)),style:E({backgroundColor:e.color}),onClick:r},[y("span",{class:k(j(n).e("content"))},[g(e.$slots,"default")],2),e.closable?(d(),f(j(w),{key:0,class:k(j(n).e("close")),onClick:_(t,["stop"])},{default:O(()=>[C(j(h))]),_:1},8,["class","onClick"])):v("v-if",!0)],6)]),_:3},8,["name"]))}}))));var x;const D=S(i($,[["__file","tag.vue"]]));export{D as E,B as t};
