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