import type { SharedValue } from 'react-native-reanimated'; import type { Chess, Move, Square, PieceSymbol } from 'chess.js'; import type { BoardState } from './types'; import type { BoardConfig } from './types'; import type { EffectTrigger } from '../types'; import { ChessboardState } from '../helpers/get-chessboard-state'; export type MoveResult = { move: Move; state: ChessboardState & { isPromotion: boolean; }; }; export type EffectSharedValues = { centerX: SharedValue; centerY: SharedValue; progress: SharedValue; trigger: SharedValue; }; type MoveCallbacks = { onMove?: (result: MoveResult) => void; onPromotionRequired?: (info: { from: Square; to: Square; color: 'w' | 'b'; complete: (piece: PieceSymbol) => void; cancel: () => void; }) => void; effectSharedValues?: EffectSharedValues; }; export declare const createMoveExecutor: (chess: Chess, boardState: BoardState, config: BoardConfig, callbacks: MoveCallbacks) => { executeMove: (from: Square, to: Square, promotionPiece?: PieceSymbol, onAnimationComplete?: () => void) => Move | null; tryMove: (from: Square, to: Square, promotionPiece?: PieceSymbol) => Promise; selectPiece: (square: Square) => void; isPromotionMove: (from: Square, to: Square) => boolean; resetBoard: (fen?: string, opts?: { slide?: { from: Square; to: Square; }; lastMove?: { from: Square; to: Square; } | null; }) => void; undo: () => Move | null; }; export type MoveExecutor = ReturnType; export {};