//#region src/theme/tokens.ts
/**
* Pisell 项目统一的 Ant Design Token 配置
* 基于 Figma 设计规范
*
* 使用场景：
* - 低代码平台（page/index.tsx）
* - Storybook 预览
* - 其他需要主题配置的场景
*/
/**
* 获取组件级别的 token 配置
*/
function getComponentsToken() {
	return {
		Table: {
			colorFillContent: "#EAECF0",
			colorFillSecondary: "#F2F4F7",
			colorBorderSecondary: "#EAECF0",
			colorFillAlter: "#F9FAFB",
			controlItemBgHover: "#F9FAFB",
			colorTextHeading: "#475467",
			colorTextDescription: "#667085",
			colorText: "#101828",
			controlHeight: 32,
			padding: 24,
			margin: 16
		},
		Message: { contentBg: "#101828" },
		Button: {
			borderRadiusSM: 6,
			borderRadiusLG: 9,
			borderRadius: 8,
			controlHeight: 36,
			colorBgContainerDisabled: "#F2F4F7",
			colorBgTextHover: "#F9FAFB",
			colorBorder: "#D0D5DD",
			colorError: "#D92D20",
			colorErrorActive: "#D92D20",
			colorErrorHover: "#B42318",
			colorErrorBg: "#FEF3F2",
			colorErrorBorderHover: "#FDA29B",
			colorErrorOutline: "rgba(217, 45, 32, 0.06)",
			colorLink: "#7F56DA",
			colorLinkActive: "#5F3DA8",
			colorLinkHover: "#6D48C4",
			colorText: "#344054",
			colorTextDisabled: "#D0D5DD",
			colorTextLightSolid: "#fff",
			colorBgTextActive: "#D0D5DD",
			controlOutline: "rgba(127, 86, 217, 0.04)",
			controlTmpOutline: "#F9FAFB",
			paddingContentHorizontal: 14,
			marginXS: 8
		},
		Divider: { colorSplit: "#EAECF0" },
		Breadcrumb: {
			itemColor: "#475467",
			colorTextDescription: "#475467",
			separatorMargin: 12,
			separatorColor: "#D0D5DD",
			linkHoverColor: "#1D2939",
			linkColor: "#475467",
			colorBgTextHover: "#F9FAFB",
			paddingXXS: 8
		},
		Dropdown: {
			borderRadiusLG: 8,
			controlHeight: 42,
			fontSize: 14
		},
		DatePicker: {
			borderRadius: 8,
			colorTextPlaceholder: "#667085",
			colorIcon: "#667085",
			colorTextQuaternary: "#D0D5DD",
			colorBgContainerDisabled: "#F9FAFB",
			colorTextDisabled: "#98A2B3"
		},
		Input: {},
		InputNumber: {},
		Select: {},
		Menu: { itemSelectedColor: "#9976e3" },
		Popover: {},
		Typography: {
			colorText: "#101828",
			colorTextSecondary: "#475467",
			colorLink: "#7F56DA",
			colorLinkHover: "#6D48C4",
			colorLinkActive: "#5F3DA8"
		}
	};
}
/**
* 获取全局 token 配置
*/
function getGlobalToken(themeColor) {
	return {
		colorPrimary: themeColor || "#5D3F9F",
		colorPrimaryBg: "#eee5ff",
		colorPrimaryBgHover: "#e4d9fc",
		colorPrimaryBorder: "#d4c3f7",
		colorSuccess: "#5f9e3f",
		colorInfo: "#5d3f9f",
		colorError: "#f5222d",
		colorSuccessBg: "#e5fcd9",
		colorSuccessBgHover: "#d5f7c3",
		colorLink: "#7F56DA",
		colorLinkActive: "#5F3DA8",
		colorLinkHover: "#6D48C4",
		colorText: "#101828",
		colorTextSecondary: "#475467",
		colorTextTertiary: "#667085",
		colorTextQuaternary: "#D0D5DD",
		colorBorder: "#D0D5DD",
		colorBorderSecondary: "#EAECF0",
		colorFill: "#D0D5DD",
		colorFillSecondary: "#EAECF0",
		colorFillTertiary: "#F2F4F7",
		colorFillQuaternary: "#F9FAFB",
		colorBgLayout: "#F2F4F7",
		colorBgSpotlight: "#101828",
		colorBgMask: "rgba(0, 0, 0, 0.5)",
		wireframe: false,
		borderRadius: 8
	};
}
/**
* 获取完整的主题配置
*/
function getThemeConfig(themeColor) {
	return {
		components: getComponentsToken(),
		token: getGlobalToken(themeColor)
	};
}
//#endregion
exports.getThemeConfig = getThemeConfig;
