/**
 * useCollisionEditor — Hook for collision editing state management
 *
 * Features:
 * - Collision body management (CRUD)
 * - Undo/redo history
 * - Collision shape operations
 * - Per-frame collision support
 * - Collision testing/preview
 * - Export to physics engine formats
 */
import type { CollisionBody, CollisionShape, CollisionShapeType } from './CollisionEditor';
export interface FrameCollision {
    frameIndex: number;
    body: CollisionBody;
}
export interface CollisionEditorState {
    /** Current body being edited */
    currentBody: CollisionBody | null;
    /** Per-frame collision data */
    frameCollisions: FrameCollision[];
    /** Currently selected frame index (for animations) */
    currentFrameIndex: number;
    /** Whether to use per-frame collisions */
    usePerFrameCollisions: boolean;
    /** Undo history */
    undoStack: CollisionBody[];
    /** Redo history */
    redoStack: CollisionBody[];
    /** Selected shape ID */
    selectedShapeId: string | null;
    /** Preview mode enabled */
    previewMode: boolean;
}
export interface UseCollisionEditorOptions {
    /** Initial body */
    initialBody?: CollisionBody | null;
    /** Initial frame collisions */
    initialFrameCollisions?: FrameCollision[];
    /** Max undo history size */
    maxHistory?: number;
    /** Called when body changes */
    onChange?: (body: CollisionBody | null, frameCollisions: FrameCollision[]) => void;
}
export interface UseCollisionEditorReturn {
    /** Current state */
    state: CollisionEditorState;
    /** Current body (auto-switches based on frame) */
    currentBody: CollisionBody | null;
    /** Update the current body */
    setBody: (body: CollisionBody) => void;
    /** Create a new body */
    createBody: () => void;
    /** Delete the current body */
    deleteBody: () => void;
    /** Clone the current body */
    cloneBody: () => void;
    /** Add a shape to current body */
    addShape: (type: CollisionShapeType) => void;
    /** Update a shape */
    updateShape: (shape: CollisionShape) => void;
    /** Delete a shape */
    deleteShape: (shapeId: string) => void;
    /** Duplicate a shape */
    duplicateShape: (shapeId: string) => void;
    /** Select a shape */
    selectShape: (shapeId: string | null) => void;
    /** Move shape in layer order */
    moveShape: (shapeId: string, direction: 'up' | 'down') => void;
    /** Undo last action */
    undo: () => void;
    /** Redo last undone action */
    redo: () => void;
    /** Can undo */
    canUndo: boolean;
    /** Can redo */
    canRedo: boolean;
    /** Toggle per-frame collisions */
    setUsePerFrameCollisions: (use: boolean) => void;
    /** Set current frame */
    setCurrentFrame: (frameIndex: number) => void;
    /** Copy collision to frame */
    copyToFrame: (targetFrameIndex: number) => void;
    /** Copy collision to all frames */
    copyToAllFrames: () => void;
    /** Toggle preview mode */
    setPreviewMode: (enabled: boolean) => void;
    /** Export to physics engine format */
    exportToFormat: (format: 'box2d' | 'matter' | 'rapier' | 'json') => string;
    /** Import from JSON */
    importFromJson: (json: string) => void;
    /** Reset to defaults */
    reset: () => void;
}
export declare function useCollisionEditor(options?: UseCollisionEditorOptions): UseCollisionEditorReturn;
export default useCollisionEditor;
