"use client"; import { AlarmClockIcon } from "lucide-react"; import { useNow } from "@/hooks/useNow"; import { formatCountdown, formatReleaseInstant } from "@/lib/minigames/countdown"; import { cn } from "@/lib/utils"; interface PhasingOutBannerProps { readonly estimatedRemovalDate?: string | null; } /** * In-game notice for a minigame whose registry status is "phasingOut". The game * stays fully playable and keeps scoring periods until it is removed; this just * tells operators when it is leaving. Display only. */ export function PhasingOutBanner({ estimatedRemovalDate }: PhasingOutBannerProps) { const now = useNow(); const instant = formatReleaseInstant(estimatedRemovalDate ?? null); const countdown = formatCountdown(estimatedRemovalDate ?? null, new Date(now)); return (

This game is being phased out.{" "} {instant ? ( <> Leaving {instant} {countdown ? ` (in ${countdown})` : "."} ) : ( "No removal date has been set yet." )}

); }