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