UNPKG

ll-package

Version:

2 lines (1 loc) 1.25 kB
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../../../../@babel/runtime/helpers/esm/extends.js"),f=require("../../_util/cssinjs/hooks/useStyleRegister/index.js"),h=require("../../style/index.js"),S=require("../internal.js"),u=require("vue"),T=require("../../config-provider/context.js"),m=require("./statistic.js");function $(n,C,l){return r=>{const t=u.computed(()=>r==null?void 0:r.value),[i,e,o]=S.useToken(),{getPrefixCls:p,iconPrefixCls:a}=T.useConfigContextInject(),s=u.computed(()=>p()),x=u.computed(()=>({theme:i.value,token:e.value,hashId:o.value,path:["Shared",s.value]}));f.default(x,()=>[{"&":h.genLinkStyle(e.value)}]);const k=u.computed(()=>({theme:i.value,token:e.value,hashId:o.value,path:[n,t.value,a.value]}));return[f.default(k,()=>{const{token:c,flush:g}=m.default(e.value),I=typeof l=="function"?l(c):l,v=d.default(d.default({},I),e.value[n]),q=`.${t.value}`,y=m.merge(c,{componentCls:q,prefixCls:t.value,iconCls:`.${a.value}`,antCls:`.${s.value}`},v),P=C(y,{hashId:o.value,prefixCls:t.value,rootPrefixCls:s.value,iconPrefixCls:a.value,overrideComponentToken:e.value[n]});return g(n,v),[h.genCommonStyle(e.value,t.value),P]}),o]}}exports.default=$;