"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const B=require("../../style/index.js");require("../../theme/internal.js");const h=require("../../theme/util/genComponentStyleHook.js"),x=require("../../theme/util/statistic.js"),s=(n,o,e,r,t)=>({backgroundColor:n,border:`${r.lineWidth}px ${r.lineType} ${o}`,[`${t}-icon`]:{color:e}}),S=n=>{const{componentCls:o,motionDurationSlow:e,marginXS:r,marginSM:t,fontSize:l,fontSizeLG:a,lineHeight:c,borderRadiusLG:g,motionEaseInOutCirc:i,alertIconSizeLG:p,colorText:d,paddingContentVerticalSM:m,alertPaddingHorizontal:u,paddingMD:b,paddingContentHorizontalLG:I}=n;return{[o]:{...B.resetComponent(n),position:"relative",display:"flex",alignItems:"center",padding:`${m}px ${u}px`,wordWrap:"break-word",borderRadius:g,[`&${o}-rtl`]:{direction:"rtl"},[`${o}-content`]:{flex:1,minWidth:0},[`${o}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:l,lineHeight:c},"&-message":{color:d},[`&${o}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${e} ${i}, opacity ${e} ${i},
        padding-top ${e} ${i}, padding-bottom ${e} ${i},
        margin-bottom ${e} ${i}`},[`&${o}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}},[`${o}-with-description`]:{alignItems:"flex-start",paddingInline:I,paddingBlock:b,[`${o}-icon`]:{marginInlineEnd:t,fontSize:p,lineHeight:0},[`${o}-message`]:{display:"block",marginBottom:r,color:d,fontSize:a},[`${o}-description`]:{display:"block"}},[`${o}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},$=n=>{const{componentCls:o,colorSuccess:e,colorSuccessBorder:r,colorSuccessBg:t,colorWarning:l,colorWarningBorder:a,colorWarningBg:c,colorError:g,colorErrorBorder:i,colorErrorBg:p,colorInfo:d,colorInfoBorder:m,colorInfoBg:u}=n;return{[o]:{"&-success":s(t,r,e,n,o),"&-info":s(u,m,d,n,o),"&-warning":s(c,a,l,n,o),"&-error":{...s(p,i,g,n,o),[`${o}-description > pre`]:{margin:0,padding:0}}}}},y=n=>{const{componentCls:o,iconCls:e,motionDurationMid:r,marginXS:t,fontSizeIcon:l,colorIcon:a,colorIconHover:c}=n;return{[o]:{"&-action":{marginInlineStart:t},[`${o}-close-icon`]:{marginInlineStart:t,padding:0,overflow:"hidden",fontSize:l,lineHeight:`${l}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${e}-close`]:{color:a,transition:`color ${r}`,"&:hover":{color:c}}},"&-close-text":{color:a,transition:`color ${r}`,"&:hover":{color:c}}}}},f=n=>[S(n),$(n),y(n)],z=h.default("Alert",n=>{const{fontSizeHeading3:o}=n,e=x.merge(n,{alertIconSizeLG:o,alertPaddingHorizontal:12});return[f(e)]});exports.default=z;exports.genActionStyle=y;exports.genAlertStyle=f;exports.genBaseStyle=S;exports.genTypeStyle=$;
