/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { FONT_DECLARATIONS_MAP } from "../packages/fonts/dist/index.js";
//#region ../tailwind-internal/dist/utils/getFontFaceDeclarations.js
/*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
/**
* Get all font face declarations for a given set of font IDs.
*/
function getFontFaceDeclarations(fontIds, fontFamilyOverrides) {
	return fontIds.flatMap((fontID) => {
		const { declarations, fontFamily, isVariableFont } = FONT_DECLARATIONS_MAP[fontID];
		const resolvedFontFamily = fontFamilyOverrides?.[fontID] ?? fontFamily;
		return declarations.map((declaration) => {
			const src = isVariableFont ? `url('${declaration.src}') format("woff2 supports variations"), url('${declaration.src}') format('woff2-variations')` : `url('${declaration.src}') format('woff2')`;
			return {
				fontFamily: resolvedFontFamily,
				fontDisplay: "swap",
				...declaration,
				src
			};
		});
	});
}
//#endregion
export { getFontFaceDeclarations };
