import{C as e,Et as t,O as n,Q as r,S as i,St as a,T as o,Y as s,cn as c,dt as l,f as u,ft as d,g as f,j as p,k as m,kt as h,n as g,nn as _,ot as v,tt as y,w as b,x}from"./vue.runtime.esm-bundler-DpGzKKN4.js";import{V as S,Zt as C,et as w,f as T,y as E}from"./style-DGCNsUJ6.js";import{A as D,j as O}from"./GxPagination-DOexUzbO.js";import{B as k,Ot as A,Vt as j,kt as M,z as N}from"./vnode-DU8g6Rf7.js";var P=E({title:{type:String,default:``},description:{type:String,default:``},type:{type:String,values:T(k),default:`info`},closable:{type:Boolean,default:!0},closeText:{type:String,default:``},showIcon:Boolean,center:Boolean,effect:{type:String,values:[`light`,`dark`],default:`light`},...O,showAfter:Number}),F={open:()=>!0,close:e=>w(e)||e instanceof Event},I=M(j(p({...p({name:`ElAlert`}),props:P,emits:F,setup(p,{emit:T}){let E=p,{Close:O}=N,j=v(),M=C(`alert`),P=a(w(E.showAfter)),F=x(()=>k[E.type]),I=x(()=>!!(E.description||j.default)),L=()=>{P.value=!0,T(`open`)},R=e=>{P.value=!1,T(`close`,e)},{onOpen:z,onClose:B}=D({showAfter:t(E,`showAfter`,0),hideAfter:t(E,`hideAfter`),autoClose:t(E,`autoClose`),open:L,close:R});return S&&z(),(t,a)=>(s(),e(g,{name:h(M).b(`fade`),persisted:``},{default:l(()=>[d(i(`div`,{class:_([h(M).b(),h(M).m(t.type),h(M).is(`center`,t.center),h(M).is(t.effect)]),role:`alert`},[t.showIcon&&(t.$slots.icon||h(F))?(s(),e(h(A),{key:0,class:_([h(M).e(`icon`),h(M).is(`big`,h(I))])},{default:l(()=>[r(t.$slots,`icon`,{},()=>[(s(),e(y(h(F))))])]),_:3},8,[`class`])):b(`v-if`,!0),i(`div`,{class:_(h(M).e(`content`))},[t.title||t.$slots.title?(s(),o(`span`,{key:0,class:_([h(M).e(`title`),{"with-description":h(I)}])},[r(t.$slots,`title`,{},()=>[n(c(t.title),1)])],2)):b(`v-if`,!0),h(I)?(s(),o(`p`,{key:1,class:_(h(M).e(`description`))},[r(t.$slots,`default`,{},()=>[n(c(t.description),1)])],2)):b(`v-if`,!0),t.closable?(s(),o(f,{key:2},[t.closeText?(s(),o(`div`,{key:0,class:_([h(M).e(`close-btn`),h(M).is(`customed`)]),onClick:R},c(t.closeText),3)):(s(),e(h(A),{key:1,class:_(h(M).e(`close-btn`)),onClick:h(B)},{default:l(()=>[m(h(O))]),_:1},8,[`class`,`onClick`]))],64)):b(`v-if`,!0)],2)],2),[[u,P.value]])]),_:3},8,[`name`]))}}),[[`__file`,`alert.vue`]]));export{I as t};