import type { ScriptGraph } from '../scripting/NodeGraph';
export type PlatformId = 'unity' | 'godot' | 'unreal' | 'pixijs' | 'phaser' | 'threejs' | 'cocos' | 'gamemaker' | 'roblox' | 'minecraft' | 'rpgmaker' | 'construct3' | 'gdevelop' | 'defold' | 'solar2d' | 'pico8' | 'tic80' | 'web-generic';
export interface PlatformInfo {
    id: PlatformId;
    name: string;
    description: string;
    icon?: string;
    website: string;
    features: PlatformFeature[];
    supportedAssets: AssetType[];
    exportFormats: string[];
}
export type PlatformFeature = '2d-rendering' | '3d-rendering' | 'physics-2d' | 'physics-3d' | 'audio' | 'networking' | 'ui-system' | 'visual-scripting' | 'tilemaps' | 'particles' | 'animation' | 'vr-ar';
export type AssetType = 'sprite' | 'tileset' | 'audio' | 'font' | 'script' | 'scene' | 'prefab' | 'material' | 'shader' | 'animation' | 'tilemap' | 'particleSystem' | 'texture' | 'data';
export interface NiceProject {
    name: string;
    version: string;
    description?: string;
    author?: string;
    settings: ProjectSettings;
    scenes: NiceScene[];
    assets: NiceAsset[];
    scripts: ScriptGraph[];
    prefabs: NicePrefab[];
}
export interface ProjectSettings {
    resolution: {
        width: number;
        height: number;
    };
    width?: number;
    height?: number;
    backgroundColor: string;
    physics: {
        gravity: {
            x: number;
            y: number;
        };
        enabled: boolean;
        velocityIterations?: number;
        positionIterations?: number;
        timeStep?: number;
    };
    audio: {
        masterVolume: number;
        musicVolume?: number;
        sfxVolume?: number;
        audioChannels?: number;
    };
    rendering: {
        pixelArt: boolean;
        antialias: boolean;
        pixelPerfect?: boolean;
        antialiasing?: boolean;
        vsync?: boolean;
        backgroundColor?: string;
    };
    input?: Record<string, unknown>;
}
export interface NiceScene {
    id: string;
    name: string;
    entities: NiceEntity[];
    tilemaps?: NiceTilemap[];
    metadata?: Record<string, unknown>;
    settings?: Record<string, unknown>;
}
export interface NiceEntity {
    id: string;
    name: string;
    type?: string;
    position?: {
        x: number;
        y: number;
    };
    rotation?: number;
    scale?: {
        x: number;
        y: number;
    };
    components: NiceComponent[];
    children?: NiceEntity[];
    prefabId?: string;
    scriptId?: string;
    tags?: string[];
    active?: boolean;
}
export interface NiceComponent {
    type: string;
    properties?: Record<string, unknown>;
    data?: Record<string, unknown>;
}
export interface NiceAsset {
    id: string;
    type: AssetType;
    name: string;
    path: string;
    metadata?: Record<string, unknown>;
    data?: Record<string, unknown>;
}
export interface NicePrefab {
    id: string;
    name: string;
    entity: NiceEntity;
}
export interface NiceTilemap {
    id: string;
    name: string;
    tilesetId: string;
    width: number;
    height: number;
    tileSize: number;
    layers: TilemapLayer[];
}
export interface TilemapLayer {
    name: string;
    data: number[];
    visible: boolean;
    opacity: number;
}
export interface ExportOptions {
    /** Target platform */
    platform: PlatformId;
    /** Output directory path */
    outputDir: string;
    /** Project name (used for folder/file naming) */
    projectName?: string;
    /** Whether to minify generated code */
    minify?: boolean;
    /** Include debug information */
    debug?: boolean;
    /** Platform-specific options */
    platformOptions?: Record<string, unknown>;
}
export interface ExportResult {
    success: boolean;
    platform: PlatformId;
    outputFiles: ExportedFile[];
    errors: ExportError[];
    warnings: ExportWarning[];
    stats: ExportStats;
}
export interface ExportedFile {
    path: string;
    content: string | Uint8Array;
    type: 'text' | 'binary';
}
export interface ExportError {
    code: string;
    message: string;
    file?: string;
    line?: number;
}
export interface ExportWarning {
    code: string;
    message: string;
    suggestion?: string;
}
export interface ExportStats {
    totalFiles: number;
    totalSize: number;
    duration: number;
    assetsProcessed: number;
    scriptsGenerated: number;
    scenesExported: number;
}
export declare abstract class PlatformExporter {
    abstract readonly platformId: PlatformId;
    abstract readonly platformInfo: PlatformInfo;
    protected errors: ExportError[];
    protected warnings: ExportWarning[];
    protected files: ExportedFile[];
    /**
     * Export a Nice2Dev project to this platform.
     */
    export(project: NiceProject, options: ExportOptions): Promise<ExportResult>;
    /**
     * Check if this platform supports a feature.
     */
    supportsFeature(feature: PlatformFeature): boolean;
    /**
     * Check if this platform supports an asset type.
     */
    supportsAsset(type: AssetType): boolean;
    protected addFile(path: string, content: string | Uint8Array, type?: 'text' | 'binary'): void;
    protected addTextFile(path: string, content: string): void;
    protected addBinaryFile(path: string, content: Uint8Array): void;
    protected addError(code: string, message: string, file?: string, line?: number): void;
    protected addWarning(code: string, message: string, suggestion?: string): void;
    protected abstract doExport(project: NiceProject, options: ExportOptions): Promise<void>;
}
export interface DetectionResult {
    platform: PlatformId;
    confidence: number;
    reasons: string[];
}
export declare function detectBestPlatform(project: NiceProject): DetectionResult[];
export declare function registerPlatform(info: PlatformInfo): void;
export declare function getPlatformInfo(id: PlatformId): PlatformInfo | undefined;
export declare function getAllPlatforms(): PlatformInfo[];
export default PlatformExporter;
