import t from"../../_util/cssinjs/Keyframes.mjs";import"../../_util/cssinjs/StyleContext.mjs";import"vue";import"../../_util/cssinjs/transformers/legacyLogicalProperties.mjs";import{resetComponent as o}from"../../style/index.mjs";import"../../theme/internal.mjs";import a from"../../theme/util/genComponentStyleHook.mjs";import{merge as e}from"../../theme/util/statistic.mjs";const s=new t("antSpinMove",{to:{opacity:1}}),p=new t("antRotate",{to:{transform:"rotate(405deg)"}}),r=i=>({[`${i.componentCls}`]:{...o(i),position:"absolute",display:"none",color:i.colorPrimary,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${i.motionDurationSlow} ${i.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${i.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:i.contentHeight,[`${i.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-i.spinDotSize/2},[`${i.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(i.spinDotSize-i.fontSize)/2+2,textShadow:`0 1px 2px ${i.colorBgContainer}`},[`&${i.componentCls}-show-text ${i.componentCls}-dot`]:{marginTop:-(i.spinDotSize/2)-10},"&-sm":{[`${i.componentCls}-dot`]:{margin:-i.spinDotSizeSM/2},[`${i.componentCls}-text`]:{paddingTop:(i.spinDotSizeSM-i.fontSize)/2+2},[`&${i.componentCls}-show-text ${i.componentCls}-dot`]:{marginTop:-(i.spinDotSizeSM/2)-10}},"&-lg":{[`${i.componentCls}-dot`]:{margin:-(i.spinDotSizeLG/2)},[`${i.componentCls}-text`]:{paddingTop:(i.spinDotSizeLG-i.fontSize)/2+2},[`&${i.componentCls}-show-text ${i.componentCls}-dot`]:{marginTop:-(i.spinDotSizeLG/2)-10}}},[`${i.componentCls}-container`]:{position:"relative",transition:`opacity ${i.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:i.colorBgContainer,opacity:0,transition:`all ${i.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${i.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:i.spinDotDefault},[`${i.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:i.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(i.spinDotSize-i.marginXXS/2)/2,height:(i.spinDotSize-i.marginXXS/2)/2,backgroundColor:i.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:s,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:p,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${i.componentCls}-dot`]:{fontSize:i.spinDotSizeSM,i:{width:(i.spinDotSizeSM-i.marginXXS/2)/2,height:(i.spinDotSizeSM-i.marginXXS/2)/2}},[`&-lg ${i.componentCls}-dot`]:{fontSize:i.spinDotSizeLG,i:{width:(i.spinDotSizeLG-i.marginXXS)/2,height:(i.spinDotSizeLG-i.marginXXS)/2}},[`&${i.componentCls}-show-text ${i.componentCls}-text`]:{display:"block"}}}),z=a("Spin",i=>{const n=e(i,{spinDotDefault:i.colorTextDescription,spinDotSize:i.controlHeightLG/2,spinDotSizeSM:i.controlHeightLG*.35,spinDotSizeLG:i.controlHeight});return[r(n)]},{contentHeight:400});export{z as default};
