import{B as K,D as Q,V as H,$ as U,E as Y,bC as Z,d as ee,N as oe,F as w,H as ne,O as te,f as s,bi as le,ad as ie,ai as ae,an as se,ap as re,aq as ce,R as N,ao as de,bM as ue,dC as ge,bL as fe,bO as pe,dD as me,dE as ve,dF as $e,dG as ye,a6 as v}from"./outputWidgets.a4629ff8.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="c0465166-e5e4-4016-a199-6b378fb9260c",e._sentryDebugIdIdentifier="sentry-dbid-c0465166-e5e4-4016-a199-6b378fb9260c")}catch{}})();const B=(e,o,n,i,a)=>({backgroundColor:e,border:`${i.lineWidth}px ${i.lineType} ${o}`,[`${a}-icon`]:{color:n}}),be=e=>{const{componentCls:o,motionDurationSlow:n,marginXS:i,marginSM:a,fontSize:u,fontSizeLG:r,lineHeight:g,borderRadiusLG:$,motionEaseInOutCirc:c,alertIconSizeLG:d,colorText:p,paddingContentVerticalSM:m,alertPaddingHorizontal:y,paddingMD:h,paddingContentHorizontalLG:C}=e;return{[o]:H(H({},U(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${m}px ${y}px`,wordWrap:"break-word",borderRadius:$,[`&${o}-rtl`]:{direction:"rtl"},[`${o}-content`]:{flex:1,minWidth:0},[`${o}-icon`]:{marginInlineEnd:i,lineHeight:0},["&-description"]:{display:"none",fontSize:u,lineHeight:g},"&-message":{color:p},[`&${o}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c},
        padding-top ${n} ${c}, padding-bottom ${n} ${c},
        margin-bottom ${n} ${c}`},[`&${o}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${o}-with-description`]:{alignItems:"flex-start",paddingInline:C,paddingBlock:h,[`${o}-icon`]:{marginInlineEnd:a,fontSize:d,lineHeight:0},[`${o}-message`]:{display:"block",marginBottom:i,color:p,fontSize:r},[`${o}-description`]:{display:"block"}},[`${o}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},he=e=>{const{componentCls:o,colorSuccess:n,colorSuccessBorder:i,colorSuccessBg:a,colorWarning:u,colorWarningBorder:r,colorWarningBg:g,colorError:$,colorErrorBorder:c,colorErrorBg:d,colorInfo:p,colorInfoBorder:m,colorInfoBg:y}=e;return{[o]:{"&-success":B(a,i,n,e,o),"&-info":B(y,m,p,e,o),"&-warning":B(g,r,u,e,o),"&-error":H(H({},B(d,c,$,e,o)),{[`${o}-description > pre`]:{margin:0,padding:0}})}}},Ce=e=>{const{componentCls:o,iconCls:n,motionDurationMid:i,marginXS:a,fontSizeIcon:u,colorIcon:r,colorIconHover:g}=e;return{[o]:{["&-action"]:{marginInlineStart:a},[`${o}-close-icon`]:{marginInlineStart:a,padding:0,overflow:"hidden",fontSize:u,lineHeight:`${u}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:r,transition:`color ${i}`,"&:hover":{color:g}}},"&-close-text":{color:r,transition:`color ${i}`,"&:hover":{color:g}}}}},Ie=e=>[be(e),he(e),Ce(e)],Se=K("Alert",e=>{const{fontSizeHeading3:o}=e,n=Q(e,{alertIconSizeLG:o,alertPaddingHorizontal:12});return[Ie(n)]}),xe={success:ue,info:ge,error:fe,warning:pe},we={success:me,info:ve,error:$e,warning:ye},Be=Z("success","info","warning","error"),He=()=>({type:v.oneOf(Be),closable:{type:Boolean,default:void 0},closeText:v.any,message:v.any,description:v.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:v.any,closeIcon:v.any,onClose:Function}),_e=ee({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:He(),setup(e,o){let{slots:n,emit:i,attrs:a,expose:u}=o;const{prefixCls:r,direction:g}=oe("alert",e),[$,c]=Se(r),d=w(!1),p=w(!1),m=w(),y=l=>{l.preventDefault();const f=m.value;f.style.height=`${f.offsetHeight}px`,f.style.height=`${f.offsetHeight}px`,d.value=!0,i("close",l)},h=()=>{var l;d.value=!1,p.value=!0,(l=e.afterClose)===null||l===void 0||l.call(e)},C=ne(()=>{const{type:l}=e;return l!==void 0?l:e.banner?"warning":"info"});u({animationEnd:h});const V=w({});return()=>{var l,f,_,T,E,A,z,D,O,F;const{banner:G,closeIcon:P=(l=n.closeIcon)===null||l===void 0?void 0:l.call(n)}=e;let{closable:L,showIcon:b}=e;const M=(f=e.closeText)!==null&&f!==void 0?f:(_=n.closeText)===null||_===void 0?void 0:_.call(n),I=(T=e.description)!==null&&T!==void 0?T:(E=n.description)===null||E===void 0?void 0:E.call(n),R=(A=e.message)!==null&&A!==void 0?A:(z=n.message)===null||z===void 0?void 0:z.call(n),S=(D=e.icon)!==null&&D!==void 0?D:(O=n.icon)===null||O===void 0?void 0:O.call(n),W=(F=n.action)===null||F===void 0?void 0:F.call(n);b=G&&b===void 0?!0:b;const k=(I?we:xe)[C.value]||null;M&&(L=!0);const t=r.value,j=te(t,{[`${t}-${C.value}`]:!0,[`${t}-closing`]:d.value,[`${t}-with-description`]:!!I,[`${t}-no-icon`]:!b,[`${t}-banner`]:!!G,[`${t}-closable`]:L,[`${t}-rtl`]:g.value==="rtl",[c.value]:!0}),X=L?s("button",{type:"button",onClick:y,class:`${t}-close-icon`,tabindex:0},[M?s("span",{class:`${t}-close-text`},[M]):P===void 0?s(le,null,null):P]):null,q=S&&(ie(S)?ae(S,{class:`${t}-icon`}):s("span",{class:`${t}-icon`},[S]))||s(k,{class:`${t}-icon`},null),J=se(`${t}-motion`,{appear:!1,css:!0,onAfterLeave:h,onBeforeLeave:x=>{x.style.maxHeight=`${x.offsetHeight}px`},onLeave:x=>{x.style.maxHeight="0px"}});return $(p.value?null:s(de,J,{default:()=>[re(s("div",N(N({role:"alert"},a),{},{style:[a.style,V.value],class:[a.class,j],"data-show":!d.value,ref:m}),[b?q:null,s("div",{class:`${t}-content`},[R?s("div",{class:`${t}-message`},[R]):null,I?s("div",{class:`${t}-description`},[I]):null]),W?s("div",{class:`${t}-action`},[W]):null,X]),[[ce,!d.value]])]}))}}}),Ee=Y(_e);export{Ee as A};
//# sourceMappingURL=index.48817ebe.js.map
