
import { FONT_DECLARATIONS_MAP, FontID } from "../../fonts/dist/index.js";
import "../types.js";
import "../consts/fontDeclarationsMap.js";

//#region src/tokens/utils/getFontUrls.d.ts
type FONT_DECLARATIONS_MAP_TYPE = typeof FONT_DECLARATIONS_MAP;
/**
 * Font URL structure for a single font.
 * - For variable fonts: a single URL string
 * - For non-variable fonts: an object mapping font weights to their URLs
 */
type FontUrlConfig<T extends FontID = FontID> = FONT_DECLARATIONS_MAP_TYPE[T]['isVariableFont'] extends true ? string : Record<FONT_DECLARATIONS_MAP_TYPE[T]['fontWeights'][number]['value'], string>;
/**
 * Map of all font IDs to their URLs.
 * Variable fonts have a single URL, non-variable fonts have multiple URLs keyed by weight.
 */
type FontUrlMap = { [key in FontID]: FontUrlConfig<key> };
/**
 * Get all font URLs organized by font ID.
 *
 * @example
 * ```ts
 * import { getFontUrls } from '@yahoo/uds/tokens';
 *
 * const fontUrls = getFontUrls();
 *
 * // Variable font - single URL
 * fontUrls.yas // => 'https://s.yimg.com/bw/fonts/yas-vf.woff2'
 *
 * // Non-variable font - URLs by weight
 * fontUrls['centra-no2'][400] // => 'https://s.yimg.com/bw/fonts/centra-no2-book.woff2'
 * fontUrls['centra-no2'][700] // => 'https://s.yimg.com/bw/fonts/centra-no2-bold.woff2'
 *
 * // Preload fonts
 * if (typeof fontUrls.yas === 'string') {
 *   ReactDOM.preload(fontUrls.yas, { as: 'font', crossOrigin: '', type: 'font/woff2' });
 * }
 * ```
 */
declare function getFontUrls(): FontUrlMap;
/**
 * Get URLs for specific fonts.
 *
 * @param fontIds - Array of font IDs to get URLs for
 * @returns Array of font URLs
 *
 * @example
 * ```ts
 * import { getFontUrlsByIds } from '@yahoo/uds/tokens';
 *
 * const urls = getFontUrlsByIds(['yahoo-sans', 'centra-no2']);
 * urls.forEach(url => {
 *   ReactDOM.preload(url, { as: 'font', crossOrigin: '', type: 'font/woff2' });
 * });
 * ```
 */
declare function getFontUrlsByIds(fontIds: FontID[]): string[];
/**
 * Convenience constant for accessing font URLs.
 * Use `getFontUrls()` function for better tree-shaking if you only need specific fonts.
 *
 * @example
 * ```ts
 * import { fontUrls } from '@yahoo/uds/tokens';
 *
 * // Variable font
 * ReactDOM.preload(fontUrls.inter, { as: 'font', crossOrigin: '', type: 'font/woff2' });
 *
 * // Non-variable font
 * ReactDOM.preload(fontUrls['centra-no2'][400], { as: 'font', crossOrigin: '', type: 'font/woff2' });
 * ```
 */
declare const fontUrls: FontUrlMap;
//#endregion
export { FontUrlConfig, FontUrlMap, fontUrls, getFontUrls, getFontUrlsByIds };