import{b as M,aj as N,d as V,aW as $,a as j,o as i,c as u,q as m,h as k,n as o,f as t,aL as h,s as r,w as d,b6 as C,E as v,g as E,al as S,e as I,Z as L,j as P,l as q}from"./index-BKKvzUDD.js";import{e as x}from"./index-BjEW7-SA.js";const F=M({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:N},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),K={close:s=>s instanceof MouseEvent,click:s=>s instanceof MouseEvent},W=["aria-label"],Z=["aria-label"];var A=V({name:"ElTag",__name:"tag",props:F,emits:K,setup(s,{emit:_}){const B=s,p=_,z=x(),{t:f}=$(),a=j("tag"),b=P(()=>{const{type:e,hit:l,effect:n,closable:c,round:w}=B;return[a.b(),a.is("closable",c),a.m(e||"primary"),a.m(z.value),a.m(n),a.is("hit",l),a.is("round",w)]}),g=e=>{p("close",e)},y=e=>{p("click",e)},T=e=>{var l,n,c;(c=(n=(l=e==null?void 0:e.component)==null?void 0:l.subTree)==null?void 0:n.component)!=null&&c.bum&&(e.component.subTree.component.bum=null)};return(e,l)=>s.disableTransitions?(i(),u("span",{key:0,class:o(b.value),style:S({backgroundColor:s.color}),onClick:y},[m("span",{class:o(t(a).e("content"))},[k(e.$slots,"default")],2),s.closable?(i(),u("button",{key:0,"aria-label":t(f)("el.tag.close"),class:o(t(a).e("close")),type:"button",onClick:h(g,["stop"])},[r(t(v),null,{default:d(()=>[r(t(C))]),_:1})],10,W)):E("v-if",!0)],6)):(i(),I(L,{key:1,name:`${t(a).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:T},{default:d(()=>[m("span",{class:o(b.value),style:S({backgroundColor:s.color}),onClick:y},[m("span",{class:o(t(a).e("content"))},[k(e.$slots,"default")],2),s.closable?(i(),u("button",{key:0,"aria-label":t(f)("el.tag.close"),class:o(t(a).e("close")),type:"button",onClick:h(g,["stop"])},[r(t(v),null,{default:d(()=>[r(t(C))]),_:1})],10,Z)):E("v-if",!0)],6)]),_:3},8,["name"]))}}),D=A;const J=q(D);export{J as E,F as t};
