import { useInternalToken } from "./useToken.js";
import { computed } from "vue";
import { useConfig } from "antdv-next/config-provider/context";
import { genStyleUtils } from "@antdv-next/cssinjs/cssinjs-utils";
//#region components/theme/genStyleUtils.ts
var { genStyleHooks, genComponentStyleHook, genSubStyleComponent } = genStyleUtils({
	usePrefix: () => {
		const configCtx = useConfig();
		return computed(() => {
			const { getPrefixCls, iconPrefixCls } = configCtx.value;
			return {
				iconPrefixCls,
				rootPrefixCls: getPrefixCls()
			};
		});
	},
	useToken: () => {
		const [theme, realToken, hashId, token, cssVar] = useInternalToken();
		return {
			theme,
			realToken,
			hashId,
			token,
			cssVar: computed(() => cssVar?.value ?? {})
		};
	},
	useCSP: () => {
		const configCtx = useConfig();
		return computed(() => configCtx.value?.csp ?? {});
	},
	layer: { name: "antdx" }
});
//#endregion
export { genComponentStyleHook, genStyleHooks, genSubStyleComponent };
