"use client" import { Shield, ShieldCheck, ShieldX, ShieldQuestion } from "lucide-react" import { cn } from "@/lib/utils" interface PlatformSupportEntry { hardwareSlug: string antiCheatRelevant: boolean antiCheatStatus: "none" | "supported" | "unsupported" | "unknown" antiCheatName: string | null } interface AntiCheatStepProps { hardwareSlug: string platformSupport: PlatformSupportEntry[] } const statusConfig = { supported: { icon: ShieldCheck, label: "Supported", color: "border-green-500/30 bg-green-500/10", textColor: "text-green-400", message: "This game's anti-cheat supports Linux/SteamOS. Multiplayer should work.", }, unsupported: { icon: ShieldX, label: "Unsupported", color: "border-red-500/30 bg-red-500/10", textColor: "text-red-400", message: "This game's anti-cheat does not support Linux/SteamOS. Multiplayer may not work.", }, unknown: { icon: ShieldQuestion, label: "Unknown", color: "border-yellow-500/30 bg-yellow-500/10", textColor: "text-yellow-400", message: "Anti-cheat compatibility is unknown. Multiplayer may or may not work.", }, none: { icon: Shield, label: "None", color: "border-zinc-500/30 bg-zinc-500/10", textColor: "text-zinc-400", message: "No anti-cheat detected for this game.", }, } as const export function AntiCheatStep({ hardwareSlug, platformSupport }: AntiCheatStepProps) { const support = platformSupport.find((p) => p.hardwareSlug === hardwareSlug) if (!hardwareSlug) { return (

Please select a hardware device first.

) } if (!support || !support.antiCheatRelevant) { return (

No anti-cheat information for this hardware device.

) } const config = statusConfig[support.antiCheatStatus] const Icon = config.icon return (

Anti-Cheat Status

Check the anti-cheat compatibility for your selected hardware before submitting.

Anti-Cheat: {support.antiCheatName || config.label}

{config.message}

) }