import{A as e,B as t,R as n,Z as r,d as i,t as a,un as o}from"./icon-K_9KhGme.js";import{i as s}from"./use-form-item-CLvhaz9M.js";import{B as c,C as l,Dt as u,Q as d,Tt as f,U as p,_ as m,g as h,h as g,l as _,pt as v,t as y,v as b,w as x,y as S}from"./vue.esm-bundler-DcNPjsgv.js";var C=r({type:{type:String,values:[`primary`,`success`,`info`,`warning`,`danger`],default:`primary`},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:o},effect:{type:String,values:[`dark`,`light`,`plain`],default:`light`},round:Boolean}),w={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},T=[`aria-label`],E=[`aria-label`],D=e(x({name:`ElTag`,__name:`tag`,props:C,emits:w,setup(e,{emit:r}){let o=e,x=r,C=s(),{t:w}=t(),D=n(`tag`),O=g(()=>{let{type:e,hit:t,effect:n,closable:r,round:i}=o;return[D.b(),D.is(`closable`,r),D.m(e||`primary`),D.m(C.value),D.m(n),D.is(`hit`,t),D.is(`round`,i)]}),k=e=>{x(`close`,e)},A=e=>{x(`click`,e)},j=e=>{e?.component?.subTree?.component?.bum&&(e.component.subTree.component.bum=null)};return(t,n)=>e.disableTransitions?(c(),S(`span`,{key:0,class:f(O.value),style:u({backgroundColor:e.color}),onClick:A},[h(`span`,{class:f(v(D).e(`content`))},[p(t.$slots,`default`)],2),e.closable?(c(),S(`button`,{key:0,"aria-label":v(w)(`el.tag.close`),class:f(v(D).e(`close`)),type:`button`,onClick:_(k,[`stop`])},[l(v(a),null,{default:d(()=>[l(v(i))]),_:1})],10,T)):b(`v-if`,!0)],6)):(c(),m(y,{key:1,name:`${v(D).namespace.value}-zoom-in-center`,appear:``,onVnodeMounted:j},{default:d(()=>[h(`span`,{class:f(O.value),style:u({backgroundColor:e.color}),onClick:A},[h(`span`,{class:f(v(D).e(`content`))},[p(t.$slots,`default`)],2),e.closable?(c(),S(`button`,{key:0,"aria-label":v(w)(`el.tag.close`),class:f(v(D).e(`close`)),type:`button`,onClick:_(k,[`stop`])},[l(v(a),null,{default:d(()=>[l(v(i))]),_:1})],10,E)):b(`v-if`,!0)],6)]),_:3},8,[`name`]))}}));export{C as n,D as t};