"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../style/index.js");require("../../theme/internal.js");const r=require("../../theme/util/genComponentStyleHook.js"),a=require("../../theme/util/statistic.js"),l=i=>{const{componentCls:e}=i;return{[e]:{...t.resetComponent(i),margin:0,padding:0,listStyle:"none",[`${e}-item`]:{position:"relative",margin:0,paddingBottom:i.timeLineItemPaddingBottom,fontSize:i.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:i.timeLineItemHeadSize,insetInlineStart:(i.timeLineItemHeadSize-i.timeLineItemTailWidth)/2,height:`calc(100% - ${i.timeLineItemHeadSize}px)`,borderInlineStart:`${i.timeLineItemTailWidth}px ${i.lineType} ${i.colorSplit}`},"&-pending":{[`${e}-item-head`]:{fontSize:i.fontSizeSM,backgroundColor:"transparent"},[`${e}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:i.timeLineItemHeadSize,height:i.timeLineItemHeadSize,backgroundColor:i.colorBgContainer,border:`${i.timeLineHeadBorderWidth}px ${i.lineType} transparent`,borderRadius:"50%","&-blue":{color:i.colorPrimary,borderColor:i.colorPrimary},"&-red":{color:i.colorError,borderColor:i.colorError},"&-green":{color:i.colorSuccess,borderColor:i.colorSuccess},"&-gray":{color:i.colorTextDisabled,borderColor:i.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:i.timeLineItemHeadSize/2,insetInlineStart:i.timeLineItemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:i.timeLineItemCustomHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(i.fontSize*i.lineHeight-i.fontSize)+i.lineWidth,marginInlineStart:i.margin+i.timeLineItemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${e}-item-tail`]:{display:"none"},[`> ${e}-item-content`]:{minHeight:i.controlHeightLG*1.2}}},[`&${e}-alternate,
        &${e}-right,
        &${e}-label`]:{[`${e}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${i.marginXXS}px`,"&-custom":{marginInlineStart:i.timeLineItemTailWidth/2}},"&-left":{[`${e}-item-content`]:{insetInlineStart:`calc(50% - ${i.marginXXS}px)`,width:`calc(50% - ${i.marginSM}px)`,textAlign:"start"}},"&-right":{[`${e}-item-content`]:{width:`calc(50% - ${i.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${e}-right`]:{[`${e}-item-right`]:{[`${e}-item-tail,
            ${e}-item-head,
            ${e}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(i.timeLineItemHeadSize+i.timeLineItemTailWidth)/2}px)`},[`${e}-item-content`]:{width:`calc(100% - ${i.timeLineItemHeadSize+i.marginXS}px)`}}},[`&${e}-pending
        ${e}-item-last
        ${e}-item-tail`]:{display:"block",height:`calc(100% - ${i.margin}px)`,borderInlineStart:`${i.timeLineItemTailWidth}px dotted ${i.colorSplit}`},[`&${e}-reverse
        ${e}-item-last
        ${e}-item-tail`]:{display:"none"},[`&${e}-reverse ${e}-item-pending`]:{[`${e}-item-tail`]:{insetBlockStart:i.margin,display:"block",height:`calc(100% - ${i.margin}px)`,borderInlineStart:`${i.timeLineItemTailWidth}px dotted ${i.colorSplit}`},[`${e}-item-content`]:{minHeight:i.controlHeightLG*1.2}},[`&${e}-label`]:{[`${e}-item-label`]:{position:"absolute",insetBlockStart:-(i.fontSize*i.lineHeight-i.fontSize)+i.timeLineItemTailWidth,width:`calc(50% - ${i.marginSM}px)`,textAlign:"end"},[`${e}-item-right`]:{[`${e}-item-label`]:{insetInlineStart:`calc(50% + ${i.marginSM}px)`,width:`calc(50% - ${i.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${e}-item-head-custom`]:{transform:"translate(50%, -50%)"}}}}},n=r.default("Timeline",i=>{const e=a.merge(i,{timeLineItemPaddingBottom:i.padding*1.25,timeLineItemHeadSize:10,timeLineItemCustomHeadPaddingVertical:i.paddingXXS,timeLinePaddingInlineEnd:2,timeLineItemTailWidth:i.lineWidthBold,timeLineHeadBorderWidth:i.wireframe?i.lineWidthBold:i.lineWidth*3});return[l(e)]});exports.default=n;
