export const DEFAULT_VERIFICATION_ICON = 'badge-check';

export const VERIFICATION_ICONS = [
  { slug: 'badge-check', name: 'Галочка' },
  { slug: 'star', name: 'Звезда' },
  { slug: 'sparkles', name: 'Искры' },
  { slug: 'moon', name: 'Луна' },
  { slug: 'sun', name: 'Солнце' },
  { slug: 'crown', name: 'Корона' },
  { slug: 'gem', name: 'Драгоценность' },
  { slug: 'heart', name: 'Сердце' },
  { slug: 'award', name: 'Награда' },
  { slug: 'shield-check', name: 'Щит' }
] as const;

export type VerificationIconSlug = (typeof VERIFICATION_ICONS)[number]['slug'];

export function isAllowedVerificationIcon(slug: string | null | undefined): slug is VerificationIconSlug {
  if (!slug) return false;
  return VERIFICATION_ICONS.some((icon) => icon.slug === slug);
}

export function resolveVerificationIcon(slug: string | null | undefined): VerificationIconSlug {
  return isAllowedVerificationIcon(slug) ? slug : DEFAULT_VERIFICATION_ICON;
}
