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