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