import { formatNumber } from "@/lib/formatters" import { getSkywarsLevel } from "@/lib/hypixel/skywars/level" import { getHeadsColor, getPrestigeName, getSkyWarsIcon, getTextColor } from "@/lib/hypixel/skywars/skywars" import { cn } from "@/lib/utils" import GenericProgress from "../../_components/GenericProgress" type SkywarsHeadsProps = { heads: number heads_special: { eww: number yucky: number meh: number decent: number salty: number tasty: number succulent: number sweet: number divine: number heavenly: number } } export function SkywarsHeads({ heads, heads_special }: SkywarsHeadsProps) { const total_special = Object.values(heads_special).reduce((a, b) => a + b) const percentages = { heavenly: heads_special.heavenly / heads, divine: heads_special.divine / heads, sweet: heads_special.sweet / heads, succulent: heads_special.succulent / heads, tasty: heads_special.tasty / heads, salty: heads_special.salty / heads, decent: heads_special.decent / heads, meh: heads_special.meh / heads, yucky: heads_special.yucky / heads, eww: heads_special.eww / heads, rest: (heads - total_special) / heads } const headsArray = Object.entries(percentages) return (
{"Total Heads Gathered: "} {formatNumber(heads)}
{total_special > 0 && ({"Shards: "} {shards}
{"Opals: "} {opals}
{"Lifetime Shards: "} {formatNumber(lifetime_shards)}
{"Lifetime Opals: "} {lifetime_opals}
[ {`${val}`} ]
) } if (level === 50) {[ {`${val}`} ]
} return ([ {val} ]
) } export function SkywarsProgress({ level, percent }: { level: number, percent: number }) { return (