// Single source of truth for platform → color + icon mapping. Used by
// PlatformChip and any other GS-style platform-tagged surface. The five
// platforms FC supports map 1:1 to the GS palette; unknown platforms fall
// back to grey + mdi-web — which is deliberately what a retired platform
// hits: a pre-#3069 deviantart source row still renders, as its raw key on
// a grey chip. Operator-confirmed scope 2026-05-27. The ICONS key set is
// pinned against backend known_platform_keys() by
// tests/test_fe_be_contract.py.

const ICONS = {
  patreon:       'mdi-patreon',
  subscribestar: 'mdi-star',
  hentaifoundry: 'mdi-palette',
  discord:       'mdi-discord',
  pixiv:         'mdi-alpha-p-box',
}

const COLORS = {
  patreon:       'red',
  subscribestar: 'amber',
  hentaifoundry: 'purple',
  discord:       'indigo',
  pixiv:         'blue',
}

const LABELS = {
  patreon:       'Patreon',
  subscribestar: 'SubscribeStar',
  hentaifoundry: 'HentaiFoundry',
  discord:       'Discord',
  pixiv:         'Pixiv',
}

export function platformIcon(platform) {
  return ICONS[platform] || 'mdi-web'
}

export function platformColor(platform) {
  return COLORS[platform] || 'grey'
}

export function platformLabel(platform) {
  return LABELS[platform] || platform
}
