const e=require("../../_util/cssinjs/Keyframes.js"),t=require("../../style/index.js"),n=require("../../theme/util/genComponentStyleHook.js"),r=require("../../theme/util/statistic.js"),i=require("./placement.js");var a=n=>{let{iconCls:r,componentCls:a,boxShadowSecondary:o,fontSizeLG:s,notificationMarginBottom:c,borderRadiusLG:l,colorSuccess:u,colorInfo:d,colorWarning:f,colorError:p,colorTextHeading:m,notificationBg:h,notificationPadding:g,notificationMarginEdge:_,motionDurationMid:v,motionEaseInOut:y,fontSize:b,lineHeight:x,width:S,notificationIconSize:C}=n,w=`${a}-notice`,T=new e.default(`antNotificationFadeIn`,{"0%":{left:{_skip_check_:!0,value:S},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),E=new e.default(`antNotificationFadeOut`,{"0%":{maxHeight:n.animationMaxHeight,marginBottom:c,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[a]:{...t.resetComponent(n),position:`fixed`,zIndex:n.zIndexPopup,marginInlineEnd:_,[`${a}-hook-holder`]:{position:`relative`},[`&${a}-top, &${a}-bottom`]:{[`${a}-notice`]:{marginInline:`auto auto`}},[`&${a}-topLeft, &${a}-bottomLeft`]:{[`${a}-notice`]:{marginInlineEnd:`auto`,marginInlineStart:0}},[`${a}-fade-enter, ${a}-fade-appear`]:{animationDuration:n.motionDurationMid,animationTimingFunction:y,animationFillMode:`both`,opacity:0,animationPlayState:`paused`},[`${a}-fade-leave`]:{animationTimingFunction:y,animationFillMode:`both`,animationDuration:v,animationPlayState:`paused`},[`${a}-fade-enter${a}-fade-enter-active, ${a}-fade-appear${a}-fade-appear-active`]:{animationName:T,animationPlayState:`running`},[`${a}-fade-leave${a}-fade-leave-active`]:{animationName:E,animationPlayState:`running`},...i.default(n),"&-rtl":{direction:`rtl`,[`${a}-notice-btn`]:{float:`left`}}}},{[w]:{position:`relative`,width:S,maxWidth:`calc(100vw - ${_*2}px)`,marginBottom:c,marginInlineStart:`auto`,padding:g,overflow:`hidden`,lineHeight:x,wordWrap:`break-word`,background:h,borderRadius:l,boxShadow:o,[`${a}-close-icon`]:{fontSize:b,cursor:`pointer`},[`${w}-message`]:{marginBottom:n.marginXS,color:m,fontSize:s,lineHeight:n.lineHeightLG},[`${w}-description`]:{fontSize:b},[`&${w}-closable ${w}-message`]:{paddingInlineEnd:n.paddingLG},[`${w}-with-icon ${w}-message`]:{marginBottom:n.marginXS,marginInlineStart:n.marginSM+C,fontSize:s},[`${w}-with-icon ${w}-description`]:{marginInlineStart:n.marginSM+C,fontSize:b},[`${w}-icon`]:{position:`absolute`,fontSize:C,lineHeight:0,[`&-success${r}`]:{color:u},[`&-info${r}`]:{color:d},[`&-warning${r}`]:{color:f},[`&-error${r}`]:{color:p}},[`${w}-close`]:{position:`absolute`,top:n.notificationPaddingVertical,insetInlineEnd:n.notificationPaddingHorizontal,color:n.colorIcon,outline:`none`,width:n.notificationCloseButtonSize,height:n.notificationCloseButtonSize,borderRadius:n.borderRadiusSM,transition:`background-color ${n.motionDurationMid}, color ${n.motionDurationMid}`,display:`flex`,alignItems:`center`,justifyContent:`center`,"&:hover":{color:n.colorIconHover,backgroundColor:n.wireframe?`transparent`:n.colorFillContent}},[`${w}-btn`]:{float:`right`,marginTop:n.marginSM}}},{[`${w}-pure-panel`]:{margin:0}}]},o=n.default(`Notification`,e=>{let t=e.paddingMD,n=e.paddingLG;return[a(r.merge(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,notificationMarginBottom:e.margin,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationIconSize:e.fontSizeLG*e.lineHeightLG,notificationCloseButtonSize:e.controlHeightLG*.55}))]},e=>({zIndexPopup:e.zIndexPopupBase+50,width:384}));exports.default=o;