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