"use client" import { GitBranch, DatabaseIcon, RefreshCwIcon } from "lucide-react" import { HardwareStep } from "./hardware-step" import { AntiCheatStep, type AntiCheatData } from "./anti-cheat-step" export interface GameVersionInfo { id: string versionString: string | null buildId: string | null isLatest: boolean } export interface SteamDBVersion { versionString: string | null buildId: string | null source?: string } interface SetupStepProps { gameId: string gameVersions: GameVersionInfo[] hardwareSlug: string onHardwareChange: (slug: string) => void hardwareName: string selectedVersionId: string onVersionChange: (versionId: string) => void newVersionString: string onNewVersionStringChange: (value: string) => void isCreatingVersion: boolean antiCheat: AntiCheatData onAntiCheatChange: (data: AntiCheatData) => void platformSupport: { hardwareSlug: string antiCheatRelevant: boolean antiCheatName: string | null antiCheatStatus: "none" | "supported" | "unsupported" | "unknown" }[] steamdbVersion: SteamDBVersion | null steamdbLoading: boolean steamdbError: string | null onRefreshSteamDB: () => void } export function SetupStep({ // eslint-disable-next-line @typescript-eslint/no-unused-vars gameId: _gameId, gameVersions, hardwareSlug, onHardwareChange, // eslint-disable-next-line @typescript-eslint/no-unused-vars hardwareName: _hardwareName, selectedVersionId, onVersionChange, newVersionString, onNewVersionStringChange, isCreatingVersion, antiCheat, onAntiCheatChange, platformSupport, steamdbVersion, steamdbLoading, steamdbError, onRefreshSteamDB, }: SetupStepProps) { const isNewVersion = selectedVersionId === "__new__" const isSteamDBVersion = selectedVersionId === "__steamdb__" const autoFetchEnabled = process.env.NEXT_PUBLIC_VERSION_AUTO_FETCH === "true" return (
{/* Hardware Section */}
{/* Game Version Section */}

Game Version

Which version of the game did you test? This helps others know if benchmarks match their version.

{/* Refresh button for auto-detection (only shown when feature enabled) */} {autoFetchEnabled && ( )} {steamdbError && (

{steamdbError}

)}
{isNewVersion && (
onNewVersionStringChange(e.target.value)} placeholder="e.g. 1.2.3, Patch 4.0, Hotfix Jan 2025" className="w-full px-4 py-3 rounded-lg border border-border bg-text/5 text-text text-sm placeholder:text-text/40 outline-none focus:border-primary focus:ring-2 focus:ring-primary/50 transition-colors" disabled={isCreatingVersion} />

Enter the game version you tested. This will create a new version entry.

)} {autoFetchEnabled && isSteamDBVersion && steamdbVersion && (

Auto-Detected Version ({steamdbVersion.source ?? "unknown source"})

Version

{steamdbVersion.versionString || "—"}

Build ID

{steamdbVersion.buildId || "—"}

This version will be created when you submit your benchmark.

)}
{/* Anti-Cheat Section */}
) }