import { AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion" import { Card, CardContent } from "@/components/ui/card" import { Separator } from "@/components/ui/separator" import { formatNumber } from "@/lib/formatters" import { devide } from "@/lib/hypixel/general" import { getDifficultyColor, getMostPlayed } from "@/lib/hypixel/megawalls/general" import { NonNullStats } from "@/lib/schema/player" import { cn } from "@/lib/utils" import CollapsedStats from "../../_components/CollapsedStats" import MegaWallsGeneralStats from "./stats" import { MegaWallsClassesTable, MegaWallsModesTable } from "./table" export default function MegaWallsStats({ stats }: { stats: NonNullStats["MegaWalls"] }) { if (!stats) return null const kd = formatNumber(devide(stats.kills, stats.deaths)) const fkd = formatNumber(devide(stats.final_kills, stats.final_deaths)) const wl = formatNumber(devide(stats.wins, stats.losses)) const mostPlayed = getMostPlayed(stats) const difficultyColor = getDifficultyColor(mostPlayed !== null ? mostPlayed.difficulty : 1) return (

Mega Walls

Main

, stat: (

{mostPlayed !== null ? mostPlayed.name : "Unknown"}

) }, { title:

KD

, stat:

{kd}

}, { title:

FKD

, stat:

{fkd}

}, { title:

Wins

, stat:

{formatNumber(stats.wins)}

}, { title:

WL

, stat:

{wl}

} ]} />
) }