import{resetComponent as e,textEllipsis as t}from"../../style/index.mjs";import n from"../../theme/util/genComponentStyleHook.mjs";import{merge as r}from"../../theme/util/statistic.mjs";var i=n=>{let{componentCls:r,holderOffsetBlock:i,motionDurationSlow:a,lineWidthBold:o,colorPrimary:s,lineType:c,colorSplit:l}=n;return{[`${r}-wrapper`]:{marginBlockStart:-i,paddingBlockStart:i,backgroundColor:`transparent`,[r]:{...e(n),position:`relative`,paddingInlineStart:o,[`${r}-link`]:{paddingBlock:n.anchorPaddingBlock,paddingInline:`${n.anchorPaddingInline}px 0`,"&-title":{...t,position:`relative`,display:`block`,marginBlockEnd:n.anchorTitleBlock,color:n.colorText,transition:`all ${n.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}},[`&-active > ${r}-link-title`]:{color:n.colorPrimary},[`${r}-link`]:{paddingBlock:n.anchorPaddingBlockSecondary}}},[`&:not(${r}-wrapper-horizontal)`]:{[r]:{"&::before":{position:`absolute`,left:{_skip_check_:!0,value:0},top:0,height:`100%`,borderInlineStart:`${o}px ${c} ${l}`,content:`" "`},[`${r}-ink`]:{position:`absolute`,left:{_skip_check_:!0,value:0},display:`none`,transform:`translateY(-50%)`,transition:`top ${a} ease-in-out`,width:o,backgroundColor:s,[`&${r}-ink-visible`]:{display:`inline-block`}}}},[`${r}-fixed ${r}-ink ${r}-ink`]:{display:`none`}}}},a=e=>{let{componentCls:t,motionDurationSlow:n,lineWidthBold:r,colorPrimary:i}=e;return{[`${t}-wrapper-horizontal`]:{position:`relative`,"&::before":{position:`absolute`,left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${e.lineType} ${e.colorSplit}`,content:`" "`},[t]:{overflowX:`scroll`,position:`relative`,display:`flex`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`},[`${t}-link:first-of-type`]:{paddingInline:0},[`${t}-ink`]:{position:`absolute`,bottom:0,transition:`left ${n} ease-in-out, width ${n} ease-in-out`,height:r,backgroundColor:i}}}}},o=n(`Anchor`,e=>{let{fontSize:t,fontSizeLG:n,padding:o,paddingXXS:s}=e,c=r(e,{holderOffsetBlock:s,anchorPaddingBlock:s,anchorPaddingBlockSecondary:s/2,anchorPaddingInline:o,anchorTitleBlock:t/14*3,anchorBallSize:n/2});return[i(c),a(c)]});export{o as default};