/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
import { opacityMap } from "../../fixtures/dist/index.js";
import { AvatarConfig, BadgeConfig, BottomSheetConfig, ButtonConfig, CheckboxConfig, ChipConfig, DividerConfig, IconButtonConfig, InputConfig, LinkConfig, MenuContentConfig, MenuItemConfig, PopoverConfig, RadioConfig, ScrimConfig, SwitchConfig, ToastConfig, TooltipConfig } from "../../automated-config/dist/generated/generatedConfigs.js";
import { generateStyles } from "../../automated-config/dist/utils/index.js";
import plugin from "tailwindcss/plugin.js";

//#region src/tailwind/plugins/components.ts
const componentsPlugin = plugin.withOptions(({ config, previewOptions = { generatePseudoStateClassModifier: false } }) => ({ addComponents, theme }) => {
	if (config.button || config.iconButton) {
		addComponents(generateStyles(ButtonConfig, config.button, theme, previewOptions));
		if (config.iconButton) addComponents(generateStyles(IconButtonConfig, config.iconButton, theme, previewOptions));
	}
	if (config.divider) addComponents(generateStyles(DividerConfig, config.divider, theme, previewOptions));
	if (config.link) addComponents(generateStyles(LinkConfig, config.link, theme, previewOptions));
	if (config.badge) addComponents(generateStyles(BadgeConfig, config.badge, theme, previewOptions));
	if (config.radio) addComponents(generateStyles(RadioConfig, config.radio, theme, previewOptions));
	if (config.avatar) addComponents(generateStyles(AvatarConfig, config.avatar, theme, previewOptions));
	if (config.chip) addComponents(generateStyles(ChipConfig, config.chip, theme, previewOptions));
	if (config.switch) addComponents(generateStyles(SwitchConfig, config.switch, theme, previewOptions));
	if (config.checkbox) addComponents(generateStyles(CheckboxConfig, config.checkbox, theme, previewOptions));
	if (config.menuItem) addComponents(generateStyles(MenuItemConfig, config.menuItem, theme, previewOptions));
	if (config.menuContent) addComponents(generateStyles(MenuContentConfig, config.menuContent, theme, previewOptions));
	if (config.input) addComponents(generateStyles(InputConfig, config.input, theme, previewOptions));
	if (config?.toast) addComponents(generateStyles(ToastConfig, config.toast, theme, previewOptions));
	if (config.tooltip) addComponents(generateStyles(TooltipConfig, config.tooltip, theme, previewOptions));
	if (config?.bottomSheet) addComponents(generateStyles(BottomSheetConfig, config.bottomSheet, theme, previewOptions));
	if (config?.scrim) addComponents(generateStyles(ScrimConfig, config.scrim, theme, previewOptions));
	if (config.popover) addComponents(generateStyles(PopoverConfig, config.popover, theme, previewOptions));
}, () => ({ theme: { extend: { opacity: opacityMap } } }));

//#endregion
export { componentsPlugin };
//# sourceMappingURL=components.js.map