import React from 'react' import { GameState, CHESS_MODELS } from '../types/chess' import { VolumeSlider } from './VolumeSlider' import '../styles/GameControls.css' export const GameControls: React.FC<{ gameState: GameState audioEnabled: boolean volumeSettings: { ambient: number game: number } selectedModel: string onStartGame: () => void onResignGame: () => void onToggleColor: () => void onToggleAudio: () => void onVolumeChange: (type: "ambient" | "game", value: number) => void onModelChange: (modelId: string) => void }> = ({ gameState, audioEnabled, volumeSettings, selectedModel, onStartGame, onResignGame, onToggleColor, onToggleAudio, onVolumeChange, onModelChange }) => { const getMainButtonText = () => { if (gameState.gameActive) { return '❌ Resign Game' } return '🎮 Start Game' } const getMainButtonAction = () => { if (gameState.gameActive) { return onResignGame } return onStartGame } const getColorButtonText = () => { return `⚪ Play as ${gameState.playerColor === 'w' ? 'White' : 'Black'}` } const getAudioButtonText = () => { return `🔊 Audio: ${audioEnabled ? 'ON' : 'OFF'}` } const getGameStatus = () => { if (gameState.aiModelLoading) { return (