const GROUP_OPTIONS = [ { value: 'type', label: 'Card Type' }, { value: 'cmc', label: 'Mana Cost' }, { value: 'color', label: 'Color' }, { value: 'rarity', label: 'Rarity' }, ]; export default function DeckDetailStatsSidebar({ deck, stats, groupBy, onGroupByChange }) { return (

Statistics

Total Cards: {stats.totalCards}
Avg. CMC: {stats.avgCmc}
Format: {deck.format}
{Object.keys(stats.colorCounts).length > 0 && (

Color Distribution

{Object.entries(stats.colorCounts) .sort(([, a], [, b]) => b - a) .map(([color, count]) => (
{color} {color}
{count}
))}
)} {Object.keys(stats.typeCounts).length > 0 && (

Card Types

{Object.entries(stats.typeCounts) .sort(([, a], [, b]) => b - a) .slice(0, 8) .map(([type, count]) => (
{type} {count}
))}
)}

Group Cards By

{GROUP_OPTIONS.map((option) => ( ))}
); }