/**
 * useAnimationPreview — Hook for animation playback in GameAsset2dEditor
 *
 * Features:
 * - Real-time frame playback with configurable speed
 * - State machine simulation with parameter control
 * - Transition blending preview
 * - Play/pause/stop/step controls
 * - Loop and ping-pong modes
 * - Timeline scrubbing
 */
import type { SpriteFrame, SpriteSheet, AnimationStateMachine } from './gameAssetTypes';
export interface AnimationPreviewState {
    isPlaying: boolean;
    currentFrameIndex: number;
    elapsedTime: number;
    playbackSpeed: number;
    currentAnimationId: string | null;
    animationType: 'single' | 'stateMachine';
    currentStateId: string | null;
    targetStateId: string | null;
    transitionProgress: number;
    isTransitioning: boolean;
    parameterValues: Map<string, boolean | number>;
    currentFrame: SpriteFrame | null;
    frameImageData: ImageData | null;
    onionSkinEnabled: boolean;
    onionSkinFrames: number;
    onionSkinOpacity: number;
}
export interface AnimationPreviewOptions {
    spriteSheets: SpriteSheet[];
    stateMachines: AnimationStateMachine[];
    onFrameChange?: (frameIndex: number) => void;
    onStateChange?: (stateId: string) => void;
    onTransitionStart?: (fromId: string, toId: string) => void;
    onTransitionEnd?: (toId: string) => void;
}
export interface AnimationPreviewApi {
    state: AnimationPreviewState;
    play: () => void;
    pause: () => void;
    stop: () => void;
    stepForward: () => void;
    stepBackward: () => void;
    setPlaybackSpeed: (speed: number) => void;
    toggleLoop: () => void;
    seekToFrame: (frameIndex: number) => void;
    seekToTime: (timeMs: number) => void;
    playAnimation: (animationId: string) => void;
    playStateMachine: (stateMachineId: string) => void;
    setParameter: (name: string, value: boolean | number) => void;
    triggerParameter: (name: string) => void;
    forceState: (stateId: string) => void;
    resetStateMachine: () => void;
    toggleOnionSkin: () => void;
    setOnionSkinFrames: (count: number) => void;
    setOnionSkinOpacity: (opacity: number) => void;
    getAnimationDuration: (animationId: string) => number;
    getFrameAt: (animationId: string, timeMs: number) => SpriteFrame | null;
    getCurrentFrameImage: () => HTMLCanvasElement | null;
}
export declare function useAnimationPreview(options: AnimationPreviewOptions): AnimationPreviewApi;
