import { redirect } from "next/navigation"; import Link from "next/link"; import { auth } from "@/auth"; import { prisma } from "@/lib/prisma"; import { creditDisplayName, creditTicker } from "@/lib/credits-brand"; import { SiteFooter } from "@/components/SiteFooter"; import { ExchangePanel } from "@/components/casino/ExchangePanel"; import { GameHistory } from "@/components/casino/GameHistory"; const T = creditTicker(); const CREDIT_LONG = creditDisplayName(); const GAMES = [ { slug: "crash", icon: "๐Ÿ“ˆ", name: `${T} Crash`, desc: "Cash out before it crashes", tag: "Solo", color: "from-orange-500 to-red-500" }, { slug: "dice", icon: "๐ŸŽฒ", name: "Dice Roll", desc: "Over/under with custom odds", tag: "Solo", color: "from-blue-500 to-cyan-500" }, { slug: "mines", icon: "๐Ÿ’ฃ", name: "Mines", desc: "Navigate the minefield", tag: "Solo", color: "from-yellow-500 to-orange-500" }, { slug: "tower", icon: "๐Ÿฐ", name: "Tower Climb", desc: "Climb higher for bigger rewards", tag: "Solo", color: "from-emerald-500 to-teal-500" }, { slug: "slots", icon: "๐ŸŽฐ", name: "Slots", desc: "Classic 3-reel slot machine", tag: "Solo", color: "from-purple-500 to-pink-500" }, { slug: "blackjack", icon: "๐Ÿƒ", name: "Blackjack", desc: "Beat the dealer to 21", tag: "vs House", color: "from-slate-500 to-gray-600" }, { slug: "roulette", icon: "๐ŸŽก", name: "Roulette", desc: "European single-zero", tag: "vs House", color: "from-rose-500 to-red-600" }, { slug: "coinflip", icon: "๐Ÿช™", name: "Coin Flip Duel", desc: "Challenge another player", tag: "PvP", color: "from-sky-500 to-blue-600" }, { slug: "pong", icon: "๐Ÿ“", name: "PvP Pong", desc: `Pong for real ${T}`, tag: "PvP", color: "from-indigo-500 to-violet-600" }, { slug: "prediction", icon: "๐Ÿ“Š", name: "Prediction Market", desc: `Pool ${T} on outcomes`, tag: "Community", color: "from-teal-500 to-cyan-600" }, ]; const TAG_COLORS: Record = { Solo: "bg-sky-900/50 text-sky-300", "vs House": "bg-red-900/50 text-red-300", PvP: "bg-purple-900/50 text-purple-300", Community: "bg-emerald-900/50 text-emerald-300", }; export default async function CasinoLobby() { const session = await auth(); if (!session?.user?.id) redirect(`/login?callbackUrl=${encodeURIComponent("/casino")}`); const wallet = await prisma.wallet.findUnique({ where: { userId: session.user.id } }); const balance = wallet?.balanceCredits ?? 0; return ( <>
{/* Header */}

{T} ยท supporter games

Wager {CREDIT_LONG} โ€” provably fair solo games, house tables, and PvP rooms.

{/* Exchange Panel + History */}

Recent Games

{/* Game Grid */}
{GAMES.map(game => (
{game.icon} {game.tag}

{game.name}

{game.desc}

))}

{CREDIT_LONG} ({T}) have no cash redemption value and are not withdrawable. Use is limited to this authorized portal under committee rules. Solo games employ HMAC-SHA256 provably fair randomness.

); }