'use client';

export type SortMode = 'name' | 'rarity' | 'count';
export type FilterMode = 'all' | 'materials' | 'essence' | 'blueprints' | 'equipment';

export const RARITY_ORDER = {
  common: 0,
  uncommon: 1,
  rare: 2,
  epic: 3,
  legendary: 4,
  mythic: 5,
};

// Map rarity to CSS variable for colors
export const RARITY_CSS_VAR: Record<string, string> = {
  common: 'var(--rarity-common)',
  uncommon: 'var(--rarity-uncommon)',
  rare: 'var(--rarity-rare)',
  epic: 'var(--rarity-epic)',
  legendary: 'var(--rarity-legendary)',
  mythic: 'var(--rarity-mythic)',
};

// Map rarity to CSS variable for glow/background
export const RARITY_GLOW_CSS_VAR: Record<string, string> = {
  common: 'var(--rarity-common-glow)',
  uncommon: 'var(--rarity-uncommon-glow)',
  rare: 'var(--rarity-rare-glow)',
  epic: 'var(--rarity-epic-glow)',
  legendary: 'var(--rarity-legendary-glow)',
  mythic: 'var(--rarity-mythic-glow)',
};
