import p from"../../_util/cssinjs/Keyframes.mjs";import"../../_util/cssinjs/StyleContext.mjs";import"vue";import"../../_util/cssinjs/transformers/legacyLogicalProperties.mjs";import{resetComponent as H}from"../../style/index.mjs";import"../../theme/internal.mjs";import v from"./placement.mjs";import w from"../../theme/util/genComponentStyleHook.mjs";import{merge as B}from"../../theme/util/statistic.mjs";const P=i=>{const{iconCls:t,componentCls:o,boxShadowSecondary:a,fontSizeLG:c,notificationMarginBottom:d,borderRadiusLG:f,colorSuccess:s,colorInfo:u,colorWarning:$,colorError:S,colorTextHeading:h,notificationBg:I,notificationPadding:b,notificationMarginEdge:l,motionDurationMid:x,motionEaseInOut:m,fontSize:e,lineHeight:z,width:g,notificationIconSize:r}=i,n=`${o}-notice`,M=new p("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:g},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),y=new p("antNotificationFadeOut",{"0%":{maxHeight:i.animationMaxHeight,marginBottom:d,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[o]:{...H(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:m,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${o}-fade-leave`]:{animationTimingFunction:m,animationFillMode:"both",animationDuration:x,animationPlayState:"paused"},[`${o}-fade-enter${o}-fade-enter-active, ${o}-fade-appear${o}-fade-appear-active`]:{animationName:M,animationPlayState:"running"},[`${o}-fade-leave${o}-fade-leave-active`]:{animationName:y,animationPlayState:"running"},...v(i),"&-rtl":{direction:"rtl",[`${o}-notice-btn`]:{float:"left"}}}},{[n]:{position:"relative",width:g,maxWidth:`calc(100vw - ${l*2}px)`,marginBottom:d,marginInlineStart:"auto",padding:b,overflow:"hidden",lineHeight:z,wordWrap:"break-word",background:I,borderRadius:f,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:s},[`&-info${t}`]:{color:u},[`&-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}}]},R=w("Notification",i=>{const t=i.paddingMD,o=i.paddingLG,a=B(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}));export{R as default};
