import type { State } from './state';
import { type Config } from './config';
import type { DrawShape } from './draw';
import { Key, MouchEvent, NumberPair, Piece, PiecesDiff, Redraw, Unbind } from './types';
export interface Api {
    set(config: Config): void;
    state: State;
    toggleOrientation(): void;
    move(orig: Key, dest: Key): void;
    setPieces(pieces: PiecesDiff): void;
    setPlinths(pieces: PiecesDiff): void;
    setLastMove(from: string, to: string): void;
    selectSquare(key: Key | null, force?: boolean): void;
    newPiece(piece: Piece, key: Key): void;
    playPremove(): boolean;
    cancelPremove(): void;
    playPredrop(): boolean;
    cancelPredrop(): void;
    cancelMove(): void;
    stop(): void;
    setShapes(shapes: DrawShape[]): void;
    setAutoShapes(shapes: DrawShape[]): void;
    getKeyAtDomPos(pos: NumberPair): Key | undefined;
    redrawAll: Redraw;
    dragNewPiece(piece: Piece, event: MouchEvent, force?: boolean): void;
    destroy: Unbind;
}
export declare function start(state: State, redrawAll: Redraw): Api;
