import"../../theme/internal.mjs";import D from"./motion.mjs";import y from"../../theme/util/genComponentStyleHook.mjs";import{merge as I}from"../../theme/util/statistic.mjs";const z=e=>{const{componentCls:o,zIndexPopup:n,colorBgMask:x,colorBgElevated:i,motionDurationSlow:h,motionDurationMid:s,padding:c,paddingLG:a,fontSizeLG:r,lineHeightLG:d,lineWidth:l,lineType:p,colorSplit:g,marginSM:w,colorIcon:b,colorIconHover:f,colorText:S,fontWeightStrong:m,drawerFooterPaddingVertical:u,drawerFooterPaddingHorizontal:$}=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:x,pointerEvents:"auto"},[t]:{position:"absolute",zIndex:n,transition:`all ${h}`,"&-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:`${c}px ${a}px`,fontSize:r,lineHeight:d,borderBottom:`${l}px ${p} ${g}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${o}-extra`]:{flex:"none"},[`${o}-close`]:{display:"inline-block",marginInlineEnd:w,color:b,fontWeight:m,fontSize:r,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${s}`,textRendering:"auto","&:focus, &:hover":{color:f,textDecoration:"none"}},[`${o}-title`]:{flex:1,margin:0,color:S,fontWeight:e.fontWeightStrong,fontSize:r,lineHeight:d},[`${o}-body`]:{flex:1,minWidth:0,minHeight:0,padding:a,overflow:"auto"},[`${o}-footer`]:{flexShrink:0,padding:`${u}px ${$}px`,borderTop:`${l}px ${p} ${g}`},"&-rtl":{direction:"rtl"}}}},_=y("Drawer",e=>{const o=I(e,{drawerFooterPaddingVertical:e.paddingXS,drawerFooterPaddingHorizontal:e.padding});return[z(o),D(o)]},e=>({zIndexPopup:e.zIndexPopupBase}));export{_ as default};
