import React from 'react' import { Color, PieceSymbol } from 'chess.js' import { ChessPiece } from './ChessPiece' import '../styles/PromotionDialog.css' export const PromotionDialog: React.FC<{ isVisible: boolean color: Color onSelect: (piece: 'q' | 'r' | 'b' | 'n') => void }> = ({ isVisible, color, onSelect }) => { if (!isVisible) return null const promotionPieces: Array<{ type: 'q' | 'r' | 'b' | 'n'; symbol: string }> = [ { type: 'q', symbol: color === 'w' ? '♕' : '♛' }, { type: 'r', symbol: color === 'w' ? '♖' : '♜' }, { type: 'b', symbol: color === 'w' ? '♗' : '♝' }, { type: 'n', symbol: color === 'w' ? '♘' : '♞' } ] return (