import e from"../../_util/cssinjs/Keyframes.mjs";import"../../_util/cssinjs/StyleContext.mjs";import"vue";import"../../_util/cssinjs/transformers/legacyLogicalProperties.mjs";import{resetComponent as n}from"../../style/index.mjs";import"../../theme/internal.mjs";import t from"../../theme/util/genComponentStyleHook.mjs";import{merge as s}from"../../theme/util/statistic.mjs";const l=new e("antProgressActive",{"0%":{transform:"translateX(-100%) scaleX(0)",opacity:.1},"20%":{transform:"translateX(-100%) scaleX(0)",opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}}),c=r=>{const{componentCls:o,iconCls:i}=r;return{[o]:{...n(r),display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:r.fontSize,marginInlineEnd:r.marginXS,marginBottom:r.marginXS},[`${o}-outer`]:{display:"inline-block",width:"100%"},[`&${o}-show-info`]:{[`${o}-outer`]:{marginInlineEnd:`calc(-2em - ${r.marginXS}px)`,paddingInlineEnd:`calc(2em + ${r.paddingXS}px)`}},[`${o}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:r.progressRemainingColor,borderRadius:r.progressLineRadius},[`${o}-inner:not(${o}-circle-gradient)`]:{[`${o}-circle-path`]:{stroke:r.colorInfo}},[`${o}-success-bg, ${o}-bg`]:{position:"relative",backgroundColor:r.colorInfo,borderRadius:r.progressLineRadius,transition:`all ${r.motionDurationSlow} ${r.motionEaseInOutCirc}`},[`${o}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:r.colorSuccess},[`${o}-text`]:{display:"inline-block",width:"2em",marginInlineStart:r.marginXS,color:r.progressInfoTextColor,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[i]:{fontSize:r.fontSize}},[`&${o}-status-active`]:{[`${o}-bg::before`]:{position:"absolute",inset:0,backgroundColor:r.colorBgContainer,borderRadius:r.progressLineRadius,opacity:0,animationName:l,animationDuration:r.progressActiveMotionDuration,animationTimingFunction:r.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${o}-status-exception`]:{[`${o}-bg`]:{backgroundColor:r.colorError},[`${o}-text`]:{color:r.colorError}},[`&${o}-status-exception ${o}-inner:not(${o}-circle-gradient)`]:{[`${o}-circle-path`]:{stroke:r.colorError}},[`&${o}-status-success`]:{[`${o}-bg`]:{backgroundColor:r.colorSuccess},[`${o}-text`]:{color:r.colorSuccess}},[`&${o}-status-success ${o}-inner:not(${o}-circle-gradient)`]:{[`${o}-circle-path`]:{stroke:r.colorSuccess}}}}},a=r=>{const{componentCls:o,iconCls:i}=r;return{[o]:{[`${o}-circle-trail`]:{stroke:r.progressRemainingColor},[`&${o}-circle ${o}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${o}-circle ${o}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:r.colorText,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[i]:{fontSize:`${r.fontSize/r.fontSizeSM}em`}},[`${o}-circle&-status-exception`]:{[`${o}-text`]:{color:r.colorError}},[`${o}-circle&-status-success`]:{[`${o}-text`]:{color:r.colorSuccess}}},[`${o}-inline-circle`]:{lineHeight:1,[`${o}-inner`]:{verticalAlign:"bottom"}}}},g=r=>{const{componentCls:o}=r;return{[o]:{[`${o}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:r.progressStepMinWidth,marginInlineEnd:r.progressStepMarginInlineEnd,backgroundColor:r.progressRemainingColor,transition:`all ${r.motionDurationSlow}`,"&-active":{backgroundColor:r.colorInfo}}}}}},p=r=>{const{componentCls:o,iconCls:i}=r;return{[o]:{[`${o}-small&-line, ${o}-small&-line ${o}-text ${i}`]:{fontSize:r.fontSizeSM}}}},x=t("Progress",r=>{const o=r.marginXXS/2,i=s(r,{progressLineRadius:100,progressInfoTextColor:r.colorText,progressDefaultColor:r.colorInfo,progressRemainingColor:r.colorFillSecondary,progressStepMarginInlineEnd:o,progressStepMinWidth:o,progressActiveMotionDuration:"2.4s"});return[c(i),a(i),g(i),p(i)]});export{x as default};
