import { Dropdown, DropdownOption, PanelSectionRow, ButtonItem } from "@decky/ui"; import { GameTarget } from "../hooks/useGameConfiguration"; interface Props { targets: GameTarget[]; runningGame: GameTarget | null; selectedAppId: string; onSelect: (appid: string) => void; onReset: () => Promise; onResetAll: () => Promise; } export function GameConfigurationSelector({ targets, runningGame, selectedAppId, onSelect, onReset, onResetAll }: Props) { const options: DropdownOption[] = [ { data: "", label: runningGame ? `Default (editing template) · ${runningGame.name}` : "Default" }, ...targets.map((target) => ({ data: target.appid, label: `${target.name} · ${target.appid}` })), ]; return <> onSelect(String(option.data))} /> void onReset()} disabled={!selectedAppId}>Reset selected game void onResetAll()} disabled={!targets.some((target) => target.configured)}>Reset all game profiles ; }