const e=require("../_util/type.js"),t=require("../_util/cssinjs/theme/createTheme.js"),n=require("../_util/cssinjs/hooks/useCacheToken.js");require("../_util/cssinjs/hooks/useStyleRegister/index.js");const r=require("./interface/presetColors.js"),i=require("./themes/seed.js"),a=require("./themes/default/index.js"),o=require("./util/alias.js"),s=require("./util/genComponentStyleHook.js"),c=require("./util/statistic.js");let l=require("vue");var u=t.default(a.default),d={token:i.default,hashed:!0},f=Symbol(`DesignTokenContext`),p=(0,l.shallowRef)(),m=e=>{(0,l.provide)(f,e),(0,l.watch)(e,()=>{p.value=(0,l.unref)(e),(0,l.triggerRef)(p)},{immediate:!0,deep:!0})},h=(0,l.defineComponent)({props:{value:e.objectType()},setup(e,{slots:t}){return m((0,l.computed)(()=>e.value)),()=>t.default?.()}});function g(){let e=(0,l.inject)(f,(0,l.computed)(()=>p.value||d)),t=(0,l.computed)(()=>`${e.value.hashed||``}`),r=(0,l.computed)(()=>e.value.theme||u),a=n.default(r,(0,l.computed)(()=>[i.default,e.value.token]),(0,l.computed)(()=>({salt:t.value,override:{override:e.value.token,...e.value.components},formatToken:o.default})));return[r,(0,l.computed)(()=>a.value[0]),(0,l.computed)(()=>e.value.hashed?a.value[1]:``)]}exports.DesignTokenProvider=h,exports.PresetColors=r.PresetColors,exports.defaultConfig=d,exports.genComponentStyleHook=s.default,exports.globalDesignTokenApi=p,exports.mergeToken=c.merge,exports.statisticToken=c.default,exports.useDesignTokenProvider=m,exports.useToken=g;