/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { opacityMap } from "../packages/fixtures/dist/index.js";
import { __toESM } from "../_virtual/_rolldown/runtime.js";
import { require_plugin } from "../node_modules/.bun/tailwindcss@3.4.19_7500dce058369e0a/node_modules/tailwindcss/plugin.js";
import { defaultTokensConfig } from "../packages/config/dist/index.js";
import { AvatarConfig, BadgeConfig, BannerConfig, BottomSheetConfig, ButtonConfig, CheckboxConfig, ChipConfig, DividerConfig, IconButtonConfig, InputConfig, LinkConfig, MenuContentConfig, MenuItemConfig, ModalConfig, PaddleNavConfig, PaginationConfig, PopoverConfig, RadioConfig, ScrimConfig, SelectConfig, SelectContentConfig, SelectItemConfig, SwitchConfig, TabConfig, TabsConfig, ToastConfig, TooltipConfig } from "../packages/automated-config/dist/generated/generatedConfigs.js";
import { generateStyles } from "../packages/automated-config/dist/utils/index.js";
//#region ../tailwind-internal/dist/plugins/components.js
/*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
const componentsPlugin = (/* @__PURE__ */ __toESM(require_plugin(), 1)).default.withOptions(({ config, emit, previewOptions = { generatePseudoStateClassModifier: false } }) => ({ addComponents, theme }) => {
	const mergedPreviewOptions = {
		...previewOptions,
		emit: emit ?? "exhaustive"
	};
	if (config.button || config.iconButton) {
		addComponents(generateStyles(ButtonConfig, config.button, theme, mergedPreviewOptions));
		if (config.iconButton) addComponents(generateStyles(IconButtonConfig, config.iconButton, theme, mergedPreviewOptions, { buttonHeightReferenceSchema: config.button }));
	}
	if (config.divider) addComponents(generateStyles(DividerConfig, config.divider, theme, mergedPreviewOptions));
	if (config.link) addComponents(generateStyles(LinkConfig, config.link, theme, mergedPreviewOptions));
	if (config.badge) addComponents(generateStyles(BadgeConfig, config.badge, theme, mergedPreviewOptions));
	if (config.radio) addComponents(generateStyles(RadioConfig, config.radio, theme, mergedPreviewOptions));
	if (config.avatar) addComponents(generateStyles(AvatarConfig, config.avatar, theme, mergedPreviewOptions));
	if (config.chip) addComponents(generateStyles(ChipConfig, config.chip, theme, mergedPreviewOptions));
	if (config.switch) addComponents(generateStyles(SwitchConfig, config.switch, theme, mergedPreviewOptions));
	if (config.checkbox) addComponents(generateStyles(CheckboxConfig, config.checkbox, theme, mergedPreviewOptions));
	if (config.menuItem) addComponents(generateStyles(MenuItemConfig, config.menuItem, theme, mergedPreviewOptions));
	if (config.menuContent) addComponents(generateStyles(MenuContentConfig, config.menuContent, theme, mergedPreviewOptions));
	if (config.input) addComponents(generateStyles(InputConfig, config.input, theme, mergedPreviewOptions));
	addComponents(generateStyles(SelectConfig, config.select ?? defaultTokensConfig.select, theme, mergedPreviewOptions));
	addComponents(generateStyles(SelectContentConfig, config.selectContent ?? defaultTokensConfig.selectContent, theme, mergedPreviewOptions));
	addComponents(generateStyles(SelectItemConfig, config.selectItem ?? defaultTokensConfig.selectItem, theme, mergedPreviewOptions));
	if (config?.toast) addComponents(generateStyles(ToastConfig, config.toast, theme, mergedPreviewOptions));
	if (config.tooltip) addComponents(generateStyles(TooltipConfig, config.tooltip, theme, mergedPreviewOptions));
	if (config?.bottomSheet) addComponents(generateStyles(BottomSheetConfig, config.bottomSheet, theme, mergedPreviewOptions));
	if (config?.scrim) addComponents(generateStyles(ScrimConfig, config.scrim, theme, mergedPreviewOptions));
	if (config.popover) addComponents(generateStyles(PopoverConfig, config.popover, theme, mergedPreviewOptions));
	addComponents(generateStyles(BannerConfig, config.banner, theme, mergedPreviewOptions));
	addComponents(generateStyles(TabConfig, config.tab, theme, mergedPreviewOptions));
	addComponents(generateStyles(TabsConfig, config.tabs, theme, mergedPreviewOptions));
	addComponents(generateStyles(ModalConfig, config.modal, theme, mergedPreviewOptions));
	addComponents(generateStyles(PaddleNavConfig, config.paddleNav, theme, mergedPreviewOptions));
	addComponents(generateStyles(PaginationConfig, config.pagination, theme, previewOptions));
}, () => ({ theme: { extend: { opacity: opacityMap } } }));
//#endregion
export { componentsPlugin };
