"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("../_util/cssinjs/StyleContext.js");const c=require("../_util/cssinjs/hooks/useCacheToken.js"),l=require("../_util/cssinjs/theme/createTheme.js");require("../_util/cssinjs/transformers/legacyLogicalProperties.js");const m=require("../_util/type.js"),p=require("./themes/default/index.js"),s=require("./themes/seed.js"),v=require("./util/alias.js");require("../config-provider/context.js");const f=l.default(p.default),i={token:s.default,hashed:!0},a=Symbol("DesignTokenContext"),o=e.shallowRef(),d=t=>{e.provide(a,t),e.watch(t,()=>{o.value=e.unref(t),e.triggerRef(o)},{immediate:!0,deep:!0})},T=e.defineComponent({props:{value:m.objectType()},setup(t,{slots:n}){return d(e.computed(()=>t.value)),()=>n.default?.()}});function g(){const t=e.inject(a,e.computed(()=>o.value||i)),n=e.computed(()=>`${t.value.hashed||""}`),u=e.computed(()=>t.value.theme||f),r=c.default(u,e.computed(()=>[s.default,t.value.token]),e.computed(()=>({salt:n.value,override:{override:t.value.token,...t.value.components},formatToken:v.default})));return[u,e.computed(()=>r.value[0]),e.computed(()=>t.value.hashed?r.value[1]:"")]}exports.DesignTokenProvider=T;exports.defaultConfig=i;exports.globalDesignTokenApi=o;exports.useDesignTokenProvider=d;exports.useToken=g;
