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