import { getColor } from "@/lib/colors" import { Player } from "@/lib/schema/player" import { Wifi, WifiOff } from "lucide-react" import Link from "next/link" type NewPackageRank = Player["player"]["newPackageRank"] type MonthlyPackageRank = Player["player"]["monthlyPackageRank"] type RankColor = Player["player"]["monthlyRankColor"] export default function DisplayName( { ign, rank, monthly, rankColor, plusColor, guildTag, tagColor, specialRank, lastLogin, lastLogout }: { ign: string rank: NewPackageRank monthly: MonthlyPackageRank rankColor: RankColor plusColor: string | undefined guildTag: string | undefined tagColor: string | undefined specialRank: string | undefined lastLogin: number | undefined lastLogout: number | undefined } ) { return (

{" "} {" "}

) } function PlayerIGN( { ign, rank, monthly, rankColor, specialRank }: { ign: string rank: NewPackageRank monthly: MonthlyPackageRank rankColor: RankColor specialRank: string | undefined } ) { if (specialRank) { if (specialRank === "YOUTUBER") { return {ign} } if (specialRank === "STAFF") { return {ign} } } if (monthly === "SUPERSTAR") { if (rankColor === "GOLD") { return {ign} } else { return {ign} } } switch (rank) { case "VIP": return {ign} case "VIP_PLUS": return {ign} case "MVP": return {ign} case "MVP_PLUS": return {ign} default: return {ign} } } function PlayerRank( { rank, monthly, plusColor, rankColor, specialRank }: { rank: NewPackageRank monthly: MonthlyPackageRank plusColor?: string rankColor: RankColor specialRank: string | undefined } ) { if (specialRank) { if (specialRank === "YOUTUBER") { return ( <> [ YOUTUBE ] ) } if (specialRank === "STAFF") { return ( <> [ ] ) } } if (monthly === "SUPERSTAR") { if (rankColor === "GOLD") { return ( <> [MVP ++ ] ) } else { return ( <> [MVP ++ ] ) } } switch (rank) { case "VIP": return [VIP] case "VIP_PLUS": return ( <> [VIP + ] ) case "MVP": return [MVP] case "MVP_PLUS": return ( <> [MVP + ] ) default: return null } } function GuildTag({ tag, tagColor, ign }: { tag?: string, tagColor?: string, ign: string }) { if (!tag) return null const color = getColor(tagColor, "text", "gray") return ( [{tag}] ) } }