import { listGames } from '../data/games/index.js'; import { escapeHtml } from './formatters.js'; const ALL_METHODS = [ 'all', 'Walking', 'Horde', 'Old Rod', 'Good Rod', 'Super Rod', 'Surf', 'Rock Smash', 'Dive', 'DexNav Hidden', 'Mirage Spot', 'Soaring', 'Gift', 'Gift Egg', 'Trade', 'Static', 'Fossil', 'Breeding', 'Evolution', ]; export function renderHeader(game, state, progress, profilesWithCounts = null) { const methodOptions = ALL_METHODS.map((m) => { const label = m === 'all' ? 'All Methods' : m; return ``; }).join(''); const versionPills = listGames() .map((g) => { const isActive = g.id === game.id; const cls = g.themeClass || (g.id === 'omega-ruby' ? 'version-or' : 'version-as'); return ` `; }) .join(''); const profileList = profilesWithCounts || (state.profiles || [{ id: 'default', name: 'Save 1', caughtCount: state.caught?.size || 0 }]); const profileOptions = profileList .map((p) => { const countText = Number.isInteger(p.caughtCount) ? ` (${p.caughtCount})` : ''; return ``; }) .join(''); const rulesetSoloLabel = game.id === 'omega-ruby' ? 'Strict Solo OR Cartridge' : 'Strict Solo AS Cartridge'; const rulesetAllLabel = game.id === 'omega-ruby' ? 'Show All (incl. Trade / AS / Events)' : 'Show All (incl. Trade / OR / Events)'; return `
← Hub
${versionPills}
${escapeHtml(game.platform)}

Professor Oak Challenge Tracker

Inspired by the Luminescent 2.1 Tracker — check any Pokémon Caught to highlight every occurrence across Areas & Pokédex. Evolutions unlock at each upcoming Gym Leader / Champion level cap, and exclusive picks lock out alternatives automatically.

${ profileList.length > 1 ? '' : '' }
${progress.totalCaught} / ${progress.totalObtainable} ${state.ruleset === 'solo' ? 'Solo POC Caught' : 'All Dex Caught'}
${progress.percent}%
Remaining: ${progress.totalRemaining}
${state.searchQuery ? '' : ''}
${ state.activeTab === 'routes' ? `` : '' }
`; }