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