/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
import { UDS_BORDER_RADIUS_THEME_KEY } from "./borderRadius.js";
import { UDS_BORDER_WIDTH_THEME_KEY } from "./borderWidth.js";
import { getNestedBorderRadiusUtilities } from "../utils/getNestedBorderRadiusUtilities.js";
import plugin from "tailwindcss/plugin.js";

//#region src/tailwind/plugins/nestedBorderRadius.ts
const nestedBorderRadiusPlugin = plugin.withOptions(() => ({ addUtilities, theme, matchUtilities }) => {
	addUtilities(getNestedBorderRadiusUtilities());
	/** Add utilities that set --radius variable for nested border radius calculations */
	matchUtilities({ "uds-nested-border-radius-size": (value) => ({ "--uds-nested-border-radius-size": value }) }, { values: theme(UDS_BORDER_RADIUS_THEME_KEY) });
	/** Add utilities that set --padding variable for nested border radius calculations */
	matchUtilities({ "uds-nested-border-radius-spacing": (value) => ({ "--uds-nested-border-radius-spacing": value }) }, { values: theme("spacing") });
	/** Add utilities that set --border-width variable for nested border radius calculations */
	matchUtilities({ "uds-nested-border-radius-width": (value) => ({ "--uds-nested-border-radius-width": value }) }, { values: theme(UDS_BORDER_WIDTH_THEME_KEY) });
});

//#endregion
export { nestedBorderRadiusPlugin };
//# sourceMappingURL=nestedBorderRadius.js.map