import { PuppetCharacterDef, SpriteAtlas, PuppetPropDef, GameEngineImportOptions } from './puppetShowTypes';

export interface GameEngineSpriteAnimation {
    frames: GameEngineAnimationFrame[];
    fps: number;
    loop: boolean;
}
export interface GameEngineAnimationFrame {
    assetId: string;
    srcRect: {
        x: number;
        y: number;
        width: number;
        height: number;
    };
    duration?: number;
}
export interface GameEngineSprite {
    id: string;
    name: string;
    assetId: string;
    width: number;
    height: number;
    anchor?: {
        x: number;
        y: number;
    };
    animations?: Record<string, GameEngineSpriteAnimation>;
}
export interface GameEngineEntityData {
    id: string;
    name: string;
    components: {
        sprite?: GameEngineSpriteComponent;
        animator?: GameEngineAnimatorComponent;
        transform?: GameEngineTransformComponent;
    };
}
export interface GameEngineSpriteComponent {
    assetId: string;
    width: number;
    height: number;
    anchor?: {
        x: number;
        y: number;
    };
    visible?: boolean;
    tint?: string;
}
export interface GameEngineAnimatorComponent {
    currentAnimation: string;
    animations: Record<string, GameEngineSpriteAnimation>;
    frame: number;
    elapsed: number;
    playing: boolean;
    loop: boolean;
}
export interface GameEngineTransformComponent {
    position: {
        x: number;
        y: number;
    };
    rotation: number;
    scale: {
        x: number;
        y: number;
    };
}
export interface GameEngineProject {
    id: string;
    name: string;
    assets: GameEngineAsset[];
    entities: GameEngineEntityData[];
    sprites: GameEngineSprite[];
}
export interface GameEngineAsset {
    id: string;
    name: string;
    type: 'image' | 'audio' | 'spritesheet' | 'tilemap';
    path: string;
    metadata?: {
        width?: number;
        height?: number;
        frameWidth?: number;
        frameHeight?: number;
        frameCount?: number;
        columns?: number;
        rows?: number;
    };
}
/**
 * Import a sprite from game engine as a puppet character
 */
export declare function importSpriteAsCharacter(sprite: GameEngineSprite, project: GameEngineProject, options?: GameEngineImportOptions): PuppetCharacterDef;
/**
 * Import an entity from game engine as a puppet character
 */
export declare function importEntityAsCharacter(entity: GameEngineEntityData, project: GameEngineProject, options?: GameEngineImportOptions): PuppetCharacterDef | null;
/**
 * Import an asset as a puppet prop
 */
export declare function importAssetAsProp(asset: GameEngineAsset, _options?: GameEngineImportOptions): PuppetPropDef | null;
/**
 * Import all sprites from a game engine project
 */
export declare function importProjectCharacters(project: GameEngineProject, options?: GameEngineImportOptions): PuppetCharacterDef[];
/**
 * Import all image assets as props
 */
export declare function importProjectProps(project: GameEngineProject, options?: GameEngineImportOptions): PuppetPropDef[];
/**
 * Export a puppet character back to game engine sprite format
 */
export declare function exportCharacterToSprite(character: PuppetCharacterDef): GameEngineSprite;
/**
 * Export character to game engine entity format
 */
export declare function exportCharacterToEntity(character: PuppetCharacterDef, position?: {
    x: number;
    y: number;
}): GameEngineEntityData;
/**
 * Create a simple sprite sheet from individual frames
 */
export declare function createSpriteSheetFromFrames(frames: Array<{
    id: string;
    image: string;
    width: number;
    height: number;
}>, options?: {
    columns?: number;
    padding?: number;
}): {
    image: string;
    atlas: PuppetCharacterDef['visual']['atlas'];
};
/**
 * Parse sprite sheet grid into frames
 */
export declare function parseSpriteSheetGrid(imageUrl: string, frameWidth: number, frameHeight: number, frameCount: number, columns?: number): SpriteAtlas;
/**
 * Validate game engine project for puppet show import
 */
export declare function validateProjectForImport(project: GameEngineProject): {
    valid: boolean;
    errors: string[];
    warnings: string[];
};
//# sourceMappingURL=gameEngineIntegration.d.ts.map