import type { CatalogName } from './types';

/**
 * Picks the locale-appropriate name for any catalog row (category, option group, option value).
 * `fa` is the default locale; any non-`en` locale reads the Persian name. Kept here (not in a
 * component) so the Home grid, the builder, and later search all label catalog rows identically.
 */
export function pickCatalogName(row: CatalogName, locale: string): string {
  return locale === 'en' ? row.nameEn : row.nameFa;
}
