import { webFonts } from '../remoteAssets/fonts';
const isThemeName = name => {
  return name in webFonts;
};
/**
 * Retrieves font configurations based on the provided theme name.
 *
 * Returns the appropriate font configuration array for the given theme.
 * If no theme name is provided or the theme name is not recognized,
 * returns the core fonts as a fallback.
 *
 * @param themeName - The name of the theme to get fonts for, or undefined
 * @returns A readonly array of FontConfig objects for the specified theme
 *
 * @example
 * ```ts
 * const fonts = getFonts('percipio'); // Returns percipio theme fonts
 * const coreFonts = getFonts(undefined); // Returns core fonts
 * const invalidFonts = getFonts('invalid'); // Returns core fonts as fallback
 * ```
 */
export const getFonts = themeName => {
  if (!themeName || !isThemeName(themeName)) {
    return webFonts.core;
  }
  return webFonts[themeName];
};