import{a0 as w,b_ as M,a2 as E,a4 as N,G as V,o as i,c as $,a as r,ab as g,n as o,f as a,g as u,w as p,h as b,A as y,l as C,a7 as v,aC as I,ai as P}from"./index-25eb6331.js";import{k as A,c as _,E as h,_ as F}from"./index-3bef6acb.js";const G=w({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:M},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),K={close:n=>n instanceof MouseEvent,click:n=>n instanceof MouseEvent},j=E({name:"ElTag"}),q=E({...j,props:G,emits:K,setup(n,{emit:d}){const S=n,B=A(),s=N("tag"),m=V(()=>{const{type:e,hit:l,effect:t,closable:c,round:z}=S;return[s.b(),s.is("closable",c),s.m(e||"primary"),s.m(B.value),s.m(t),s.is("hit",l),s.is("round",z)]}),f=e=>{d("close",e)},k=e=>{d("click",e)},T=e=>{var l,t,c;(c=(t=(l=e==null?void 0:e.component)==null?void 0:l.subTree)==null?void 0:t.component)!=null&&c.bum&&(e.component.subTree.component.bum=null)};return(e,l)=>e.disableTransitions?(i(),$("span",{key:0,class:o(a(m)),style:v({backgroundColor:e.color}),onClick:k},[r("span",{class:o(a(s).e("content"))},[g(e.$slots,"default")],2),e.closable?(i(),u(a(h),{key:0,class:o(a(s).e("close")),onClick:y(f,["stop"])},{default:p(()=>[b(a(_))]),_:1},8,["class","onClick"])):C("v-if",!0)],6)):(i(),u(I,{key:1,name:"".concat(a(s).namespace.value,"-zoom-in-center"),appear:"",onVnodeMounted:T},{default:p(()=>[r("span",{class:o(a(m)),style:v({backgroundColor:e.color}),onClick:k},[r("span",{class:o(a(s).e("content"))},[g(e.$slots,"default")],2),e.closable?(i(),u(a(h),{key:0,class:o(a(s).e("close")),onClick:y(f,["stop"])},{default:p(()=>[b(a(_))]),_:1},8,["class","onClick"])):C("v-if",!0)],6)]),_:3},8,["name"]))}});var D=F(q,[["__file","tag.vue"]]);const L=P(D);export{L as E,G as t};
