import { Card, CardContent, CardHeader, CardTitle } from "./ui/card"; import { Progress } from "./ui/progress"; import { Gift, Clock, Sparkles, Zap, Timer } from "lucide-react"; import { cn } from "../lib/utils"; import { Skeleton } from "./ui/skeleton"; export interface LootdropData { rewardAmount: number; currency: string; createdAt: string; expiresAt: string | null; } export interface LootdropState { monitoredChannels: number; hottestChannel: { id: string; messages: number; progress: number; cooldown: boolean; } | null; config: { requiredMessages: number; dropChance: number; }; } interface LootdropCardProps { drop?: LootdropData | null; state?: LootdropState; isLoading?: boolean; className?: string; } export function LootdropCard({ drop, state, isLoading, className }: LootdropCardProps) { if (isLoading) { return ( Lootdrop Status ); } const isActive = !!drop; const progress = state?.hottestChannel?.progress || 0; const isCooldown = state?.hottestChannel?.cooldown || false; return ( {/* Ambient Background Effect */} {isActive && ( )} {isActive ? "Active Lootdrop" : "Lootdrop Potential"} {isActive && ( )} {isActive ? ( {drop.rewardAmount.toLocaleString()} {drop.currency} Dropped {new Date(drop.createdAt).toLocaleTimeString()} ) : ( {isCooldown ? ( Cooling Down... Channels are recovering. ) : ( 80 ? "text-yellow-500" : "text-muted-foreground")} /> Next Drop Chance {Math.round(progress)}% 80 ? "bg-yellow-500" : "bg-primary")} /> {state?.hottestChannel ? ( {state.hottestChannel.messages} / {state.config.requiredMessages} msgs ) : ( No recent activity )} )} )} ); }
Cooling Down...
Channels are recovering.
{state.hottestChannel.messages} / {state.config.requiredMessages} msgs
No recent activity