"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("../../theme/internal.js");const D=require("./motion.js"),v=require("../../theme/util/genComponentStyleHook.js"),y=require("../../theme/util/statistic.js"),I=e=>{const{componentCls:o,zIndexPopup:n,colorBgMask:c,colorBgElevated:i,motionDurationSlow:g,motionDurationMid:h,padding:x,paddingLG:a,fontSizeLG:r,lineHeightLG:d,lineWidth:l,lineType:p,colorSplit:s,marginSM:u,colorIcon:w,colorIconHover:b,colorText:f,fontWeightStrong:S,drawerFooterPaddingVertical:$,drawerFooterPaddingHorizontal:m}=e,t=`${o}-content-wrapper`;return{[o]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none","&-pure":{position:"relative",background:i,[`&${o}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${o}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${o}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${o}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${o}-mask`]:{position:"absolute",inset:0,zIndex:n,background:c,pointerEvents:"auto"},[t]:{position:"absolute",zIndex:n,transition:`all ${g}`,"&-hidden":{display:"none"}},[`&-left > ${t}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${t}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${t}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${t}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${o}-content`]:{width:"100%",height:"100%",overflow:"auto",background:i,pointerEvents:"auto"},[`${o}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${o}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${x}px ${a}px`,fontSize:r,lineHeight:d,borderBottom:`${l}px ${p} ${s}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${o}-extra`]:{flex:"none"},[`${o}-close`]:{display:"inline-block",marginInlineEnd:u,color:w,fontWeight:S,fontSize:r,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${h}`,textRendering:"auto","&:focus, &:hover":{color:b,textDecoration:"none"}},[`${o}-title`]:{flex:1,margin:0,color:f,fontWeight:e.fontWeightStrong,fontSize:r,lineHeight:d},[`${o}-body`]:{flex:1,minWidth:0,minHeight:0,padding:a,overflow:"auto"},[`${o}-footer`]:{flexShrink:0,padding:`${$}px ${m}px`,borderTop:`${l}px ${p} ${s}`},"&-rtl":{direction:"rtl"}}}},z=v.default("Drawer",e=>{const o=y.merge(e,{drawerFooterPaddingVertical:e.paddingXS,drawerFooterPaddingHorizontal:e.padding});return[I(o),D.default(o)]},e=>({zIndexPopup:e.zIndexPopupBase}));exports.default=z;
