const CARD_ICON_MAP: Record<string, string> = {
  legacy_weight: "/images/pictos/bebe-balance.png",
  legacy_sex: "/images/pictos/choix-fille.png",
  legacy_names: "/images/pictos/bebe-garcon.png",
  legacy_head: "/images/pictos/reglette.png",
  legacy_height: "/images/pictos/regle.png",
  legacy_birth_date: "/images/pictos/jouet-bebe.png",
};

const DEFAULT_ICON = "/images/pictos/jouet-bebe.png";

export function getCardIcon(code: string | null): string {
  if (!code) return DEFAULT_ICON;
  return CARD_ICON_MAP[code] ?? DEFAULT_ICON;
}
