/** Sponsor kart rozet anahtarı (data/sponsors.json içinde saklanır). */
export const SPONSOR_BADGE_ANA = "ana-sponsorlar";

export const SPONSOR_BADGE_ORDER = [SPONSOR_BADGE_ANA];

const LEGACY_BADGE_MAP = {
  oynadigim: SPONSOR_BADGE_ANA,
  guvenilir: SPONSOR_BADGE_ANA,
  Önerilen: SPONSOR_BADGE_ANA,
  Güvenilir: SPONSOR_BADGE_ANA,
  SPONSORLAR: SPONSOR_BADGE_ANA,
};

export function normalizeSponsorBadge(badge) {
  if (badge == null || badge === "") return SPONSOR_BADGE_ANA;
  const s = String(badge).trim();
  if (s === SPONSOR_BADGE_ANA) return s;
  return LEGACY_BADGE_MAP[s] ?? SPONSOR_BADGE_ANA;
}

export function sponsorBadgeLabelKey(badge) {
  if (badge === SPONSOR_BADGE_ANA) return null;
  return null;
}

export function sponsorHomeSectionTitleKey(badge) {
  if (badge === SPONSOR_BADGE_ANA) return "homeSectionAnaSponsors";
  return "homeSectionAnaSponsors";
}

export function sponsorHomeSectionId(badge) {
  if (badge === SPONSOR_BADGE_ANA) return "home-section-ana-sponsorlar";
  return "home-section-ana-sponsorlar";
}
