const e=require("../../style/index.js"),t=require("../../theme/util/genComponentStyleHook.js"),n=require("../../theme/util/statistic.js"),r=require("../../style/motion/fade.js"),i=require("../../style/motion/zoom.js");function a(e){return{position:e,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}var o=e=>{let{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}${e.antCls}-zoom-enter, ${t}${e.antCls}-zoom-appear`]:{transform:`none`,opacity:0,animationDuration:e.motionDurationSlow,userSelect:`none`},[`${t}${e.antCls}-zoom-leave ${t}-content`]:{pointerEvents:`none`},[`${t}-mask`]:{...a(`fixed`),zIndex:e.zIndexPopupBase,height:`100%`,backgroundColor:e.colorBgMask,[`${t}-hidden`]:{display:`none`}},[`${t}-wrap`]:{...a(`fixed`),overflow:`auto`,outline:0,WebkitOverflowScrolling:`touch`}}},{[`${t}-root`]:r.initFadeMotion(e)}]},s=t=>{let{componentCls:n}=t;return[{[`${n}-root`]:{[`${n}-wrap`]:{zIndex:t.zIndexPopupBase,position:`fixed`,inset:0,overflow:`auto`,outline:0,WebkitOverflowScrolling:`touch`},[`${n}-wrap-rtl`]:{direction:`rtl`},[`${n}-centered`]:{textAlign:`center`,"&::before":{display:`inline-block`,width:0,height:`100%`,verticalAlign:`middle`,content:`""`},[n]:{top:0,display:`inline-block`,paddingBottom:0,textAlign:`start`,verticalAlign:`middle`}},[`@media (max-width: ${t.screenSMMax})`]:{[n]:{maxWidth:`calc(100vw - 16px)`,margin:`${t.marginXS} auto`},[`${n}-centered`]:{[n]:{flex:1}}}}},{[n]:{...e.resetComponent(t),pointerEvents:`none`,position:`relative`,top:100,width:`auto`,maxWidth:`calc(100vw - ${t.margin*2}px)`,margin:`0 auto`,paddingBottom:t.paddingLG,[`${n}-title`]:{margin:0,color:t.modalHeadingColor,fontWeight:t.fontWeightStrong,fontSize:t.modalHeaderTitleFontSize,lineHeight:t.modalHeaderTitleLineHeight,wordWrap:`break-word`},[`${n}-content`]:{position:`relative`,backgroundColor:t.modalContentBg,backgroundClip:`padding-box`,border:0,borderRadius:t.borderRadiusLG,boxShadow:t.boxShadowSecondary,pointerEvents:`auto`,padding:`${t.paddingMD}px ${t.paddingContentHorizontalLG}px`},[`${n}-close`]:{position:`absolute`,top:(t.modalHeaderCloseSize-t.modalCloseBtnSize)/2,insetInlineEnd:(t.modalHeaderCloseSize-t.modalCloseBtnSize)/2,zIndex:t.zIndexPopupBase+10,padding:0,color:t.modalCloseColor,fontWeight:t.fontWeightStrong,lineHeight:1,textDecoration:`none`,background:`transparent`,borderRadius:t.borderRadiusSM,width:t.modalConfirmIconSize,height:t.modalConfirmIconSize,border:0,outline:0,cursor:`pointer`,transition:`color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,"&-x":{display:`block`,fontSize:t.fontSizeLG,fontStyle:`normal`,lineHeight:`${t.modalCloseBtnSize}px`,textAlign:`center`,textTransform:`none`,textRendering:`auto`},"&:hover":{color:t.modalIconHoverColor,backgroundColor:t.wireframe?`transparent`:t.colorFillContent,textDecoration:`none`},"&:active":{backgroundColor:t.wireframe?`transparent`:t.colorFillContentHover},...e.genFocusStyle(t)},[`${n}-header`]:{color:t.colorText,background:t.modalHeaderBg,borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,marginBottom:t.marginXS},[`${n}-body`]:{fontSize:t.fontSize,lineHeight:t.lineHeight,wordWrap:`break-word`},[`${n}-footer`]:{textAlign:`end`,background:t.modalFooterBg,marginTop:t.marginSM,[`${t.antCls}-btn + ${t.antCls}-btn:not(${t.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:t.marginXS}},[`${n}-open`]:{overflow:`hidden`}}},{[`${n}-pure-panel`]:{top:`auto`,padding:0,display:`flex`,flexDirection:`column`,[`${n}-content,
          ${n}-body,
          ${n}-confirm-body-wrapper`]:{display:`flex`,flexDirection:`column`,flex:`auto`},[`${n}-confirm-body`]:{marginBottom:`auto`}}}]},c=t=>{let{componentCls:n}=t,r=`${n}-confirm`;return{[r]:{"&-rtl":{direction:`rtl`},[`${t.antCls}-modal-header`]:{display:`none`},[`${r}-body-wrapper`]:{...e.clearFix()},[`${r}-body`]:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,[`${r}-title`]:{flex:`0 0 100%`,display:`block`,overflow:`hidden`,color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.modalHeaderTitleFontSize,lineHeight:t.modalHeaderTitleLineHeight,[`+ ${r}-content`]:{marginBlockStart:t.marginXS,flexBasis:`100%`,maxWidth:`calc(100% - ${t.modalConfirmIconSize+t.marginSM}px)`}},[`${r}-content`]:{color:t.colorText,fontSize:t.fontSize},[`> ${t.iconCls}`]:{flex:`none`,marginInlineEnd:t.marginSM,fontSize:t.modalConfirmIconSize,[`+ ${r}-title`]:{flex:1},[`+ ${r}-title + ${r}-content`]:{marginInlineStart:t.modalConfirmIconSize+t.marginSM}}},[`${r}-btns`]:{textAlign:`end`,marginTop:t.marginSM,[`${t.antCls}-btn + ${t.antCls}-btn`]:{marginBottom:0,marginInlineStart:t.marginXS}}},[`${r}-error ${r}-body > ${t.iconCls}`]:{color:t.colorError},[`${r}-warning ${r}-body > ${t.iconCls},
        ${r}-confirm ${r}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${r}-info ${r}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${r}-success ${r}-body > ${t.iconCls}`]:{color:t.colorSuccess},[`${n}-zoom-leave ${n}-btns`]:{pointerEvents:`none`}}},l=e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`,[`${t}-confirm-body`]:{direction:`rtl`}}}}},u=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-confirm`;return{[t]:{[`${t}-content`]:{padding:0},[`${t}-header`]:{padding:e.modalHeaderPadding,borderBottom:`${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,marginBottom:0},[`${t}-body`]:{padding:e.modalBodyPadding},[`${t}-footer`]:{padding:`${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,borderTop:`${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,marginTop:0}},[r]:{[`${n}-modal-body`]:{padding:`${e.padding*2}px ${e.padding*2}px ${e.paddingLG}px`},[`${r}-body`]:{[`> ${e.iconCls}`]:{marginInlineEnd:e.margin,[`+ ${r}-title + ${r}-content`]:{marginInlineStart:e.modalConfirmIconSize+e.margin}}},[`${r}-btns`]:{marginTop:e.marginLG}}}},d=t.default(`Modal`,e=>{let t=e.padding,r=e.fontSizeHeading5,a=e.lineHeightHeading5,d=n.merge(e,{modalBodyPadding:e.paddingLG,modalHeaderBg:e.colorBgElevated,modalHeaderPadding:`${t}px ${e.paddingLG}px`,modalHeaderBorderWidth:e.lineWidth,modalHeaderBorderStyle:e.lineType,modalHeaderTitleLineHeight:a,modalHeaderTitleFontSize:r,modalHeaderBorderColorSplit:e.colorSplit,modalHeaderCloseSize:a*r+t*2,modalContentBg:e.colorBgElevated,modalHeadingColor:e.colorTextHeading,modalCloseColor:e.colorTextDescription,modalFooterBg:`transparent`,modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterPaddingVertical:e.paddingXS,modalFooterPaddingHorizontal:e.padding,modalFooterBorderWidth:e.lineWidth,modalConfirmTitleFontSize:e.fontSizeLG,modalIconHoverColor:e.colorIconHover,modalConfirmIconSize:e.fontSize*e.lineHeight,modalCloseBtnSize:e.controlHeightLG*.55});return[s(d),c(d),l(d),o(d),e.wireframe&&u(d),i.initZoomMotion(d,`zoom`)]});exports.default=d,exports.genModalMaskStyle=o;