import{computed as r}from"vue";import"../../_util/cssinjs/StyleContext.mjs";import v from"../../_util/cssinjs/hooks/useStyleRegister/index.mjs";import"../../_util/cssinjs/transformers/legacyLogicalProperties.mjs";import{useConfigContextInject as g}from"../../config-provider/context.mjs";import{genLinkStyle as y,genCommonStyle as T}from"../../style/index.mjs";import{useToken as P}from"../internal.mjs";import S,{merge as $}from"./statistic.mjs";function B(t,f,l){return p=>{const o=r(()=>p?.value),[u,e,n]=P(),{getPrefixCls:c,iconPrefixCls:a}=g(),s=r(()=>c()),C=r(()=>({theme:u.value,token:e.value,hashId:n.value,path:["Shared",s.value]}));v(C,()=>[{"&":y(e.value)}]);const h=r(()=>({theme:u.value,token:e.value,hashId:n.value,path:[t,o.value,a.value]}));return[v(h,()=>{const{token:i,flush:d}=S(e.value),m={...typeof l=="function"?l(i):l,...e.value[t]},k=`.${o.value}`,x=$(i,{componentCls:k,prefixCls:o.value,iconCls:`.${a.value}`,antCls:`.${s.value}`},m),I=f(x,{hashId:n.value,prefixCls:o.value,rootPrefixCls:s.value,iconPrefixCls:a.value,overrideComponentToken:e.value[t]});return d(t,m),[T(e.value,o.value),I]}),n]}}export{B as default};
