import { formatNumber } from "@/lib/formatters" import { getSkywarsLevel } from "@/lib/hypixel/skywars/level" import { getPrestige, getSkyWarsIcon } from "@/lib/hypixel/skywars/skywars" import { cn } from "@/lib/utils" import GenericProgress from "../../_components/GenericProgress" import { HeadsBar, PresigeousHeads } from "./client" 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 } prestigeous: { username: string, timestamp: number, sacrifice: string }[] } export function SkywarsHeads({ heads, heads_special, prestigeous }: SkywarsHeadsProps) { const total_special = Object.values(heads_special).reduce((a, b) => a + b) const percentages = { heavenly: heads_special.heavenly, divine: heads_special.divine, sweet: heads_special.sweet, succulent: heads_special.succulent, tasty: heads_special.tasty, salty: heads_special.salty, decent: heads_special.decent, meh: heads_special.meh, yucky: heads_special.yucky, eww: heads_special.eww, rest: (heads - total_special) } const headsArray = Object.entries(percentages) return (

{"Total Heads Gathered: "} {formatNumber(heads)}

{total_special > 0 ? :

This person has no heads collected.

}

Prestigious Head Collection

{prestigeous.length > 0 ? :

No prestigeous heads. Now what a skill issue.

}
) } export function AngelOfDeath( { shards, lifetime_shards, opals, lifetime_opals }: { shards: number, lifetime_shards: number, opals: number, lifetime_opals: number } ) { return (

{"Shards: "} {shards}

{"Opals: "} {opals}

{"Lifetime Shards: "} {formatNumber(lifetime_shards)}

{"Lifetime Opals: "} {lifetime_opals}

) } export function ShardProgress({ percent, shards }: { percent: number, shards: number }) { return (

Shard Progress

) } export function SkywarsLevel({ xp, icon }: { xp: number, icon: string | undefined }) { const level = getSkywarsLevel(xp) const pres = getPrestige(Math.floor(level)) const swIcon = getSkyWarsIcon(icon) const val = `${Math.floor(level)}${swIcon}` // if (level > 150) { // return ( //

// [ // // {`${val}`} // // ] //

// ) // } // // if (level === 50) { //

// [ // // {`${val}`} // // ] //

// } function MapSkywarsPrestigeColors() { if (typeof pres.colormap_2 === "string") { return {val} } return ( <> {val.split("").map((c, i) => { if (level.toString().length === 2) { return {c} } else { } })} ) } return (

[ ]

) } export function SkywarsProgress({ level, percent, currentXp, ceilingXp }: { level: number, percent: number, currentXp: number, ceilingXp: number }) { return (
) } function LevelNumber({ level, className }: { level: number, className?: string }) { if (level > 150 || level === 50) { return (
150 ? "font-bold" : undefined, className)} style={{ backgroundImage: "linear-gradient(to left,#a0a,#f5f,#5ff,#5f5,#ff5,#fa0,#f55)", WebkitBackgroundClip: "text", color: "transparent" }} > {level}
) } return
{level}
} function Progress({ level, percent, tooltipId, tooltipContent }: { level: number, percent: number, tooltipId: string, tooltipContent: string }) { if (level > 150 || level === 50) { return } return ( ) } export function SkywarsPrestige({ level, icon }: { level: number, icon?: string }) { const swIcon = getSkyWarsIcon(icon) const pres = getPrestige(level) const val = `${pres} ${swIcon}` // if (level > 150 || level === 50) { // return ( // 150 ? "font-bold" : undefined} // > // {val} // // ) // } return ( {val} ) }