/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
const require_plugin$1 = require("../node_modules/.bun/tailwindcss@3.4.19_7500dce058369e0a/node_modules/tailwindcss/plugin.cjs");
const require_composeTailwindPlugins = require("../utils/composeTailwindPlugins.cjs");
const require_index = require("../packages/css-tokens/dist/index.cjs");
const require_fromEntries = require("../packages/utils/dist/fromEntries.cjs");
const require_index$1 = require("../packages/modes/dist/index.cjs");
//#region ../tailwind-internal/dist/plugins/borderRadius.js
/*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
var import_plugin = /* @__PURE__ */ require_runtime.__toESM(require_plugin$1.require_plugin(), 1);
const UDS_BORDER_RADIUS_THEME_KEY = "udsBorderRadius";
const udsBorderRadiusToCSSVariable = (token) => `var(--${require_index.BORDER_RADIUS_PREFIX}-${token})`;
const getBorderRadiusTheme = (config, mergeTokensIntoTailwindTheme) => {
	/**
	* Given the UDS border radius tokens in config (none, xs, sm, md, lg, xl, full), create a tailwind
	* border radius theme value that points to the corresponding UDS CSS variables.
	*
	* For example:
	*
	*   {
	*     sm: 'var(--uds-border-radius-sm)',
	*     md: 'var(--uds-border-radius-md)',
	*   }
	*
	* Note: The values of the CSS variables are defined elsewhere. This code only ensures the Tailwind-generated
	* classes are mapped to the correct CSS variable.
	*/
	const udsBorderRadii = require_fromEntries.fromEntries(Object.keys(config).map((udsAlias) => [udsAlias, udsBorderRadiusToCSSVariable(udsAlias)]));
	if (!mergeTokensIntoTailwindTheme) return { [UDS_BORDER_RADIUS_THEME_KEY]: udsBorderRadii };
	return {
		[UDS_BORDER_RADIUS_THEME_KEY]: udsBorderRadii,
		borderRadius: {
			...udsBorderRadii,
			DEFAULT: udsBorderRadiusToCSSVariable("sm"),
			sm: udsBorderRadiusToCSSVariable("xs")
		}
	};
};
const borderRadiusPlugin = import_plugin.default.withOptions(() => ({ matchUtilities, theme }) => {
	matchUtilities({
		"uds-border-radius": (value) => ({ "border-radius": value }),
		"uds-border-top-start-radius": (value) => ({ "border-start-start-radius": value }),
		"uds-border-top-end-radius": (value) => ({ "border-start-end-radius": value }),
		"uds-border-bottom-start-radius": (value) => ({ "border-end-start-radius": value }),
		"uds-border-bottom-end-radius": (value) => ({ "border-end-end-radius": value })
	}, { values: theme(UDS_BORDER_RADIUS_THEME_KEY) });
}, ({ config, disableOverrideTailwindTheme }) => {
	const shouldNotMergeBorderRadiusTokensIntoTailwindTheme = require_composeTailwindPlugins.shouldNotMergeTokensIntoTailwindTheme(disableOverrideTailwindTheme, "borderRadius");
	return { theme: { extend: { ...getBorderRadiusTheme(config.scaleMode[require_index$1.DEFAULT_SCALE_MODE].borderRadius, !shouldNotMergeBorderRadiusTokensIntoTailwindTheme) } } };
});
//#endregion
exports.UDS_BORDER_RADIUS_THEME_KEY = UDS_BORDER_RADIUS_THEME_KEY;
exports.borderRadiusPlugin = borderRadiusPlugin;
