/**
 * @file OgmoImporter.ts
 * @description OGMO Editor Level Importer
 * PRO-1.3: Scene Format Interoperability
 *
 * OGMO Editor is a free, open-source 2D level editor.
 * Supports OGMO 3 format (JSON-based).
 *
 * File Types:
 * - .ogmo - Project file
 * - .json - Level file (usually named *.ogmo.json or just *.json)
 */
import { SceneImporter, ImportOptions, ImportResult, ParsedScene, ImportError } from './SceneImporter';
/** OGMO 3 Project File */
export interface OgmoProject {
    name: string;
    ogmoVersion: string;
    levelPaths?: string[];
    backgroundColor: string;
    gridColor: string;
    anglesRadians: boolean;
    directoryDepth: number;
    layerGridDefaultSize: {
        x: number;
        y: number;
    };
    levelDefaultSize: {
        x: number;
        y: number;
    };
    levelMinSize: {
        x: number;
        y: number;
    };
    levelMaxSize: {
        x: number;
        y: number;
    };
    levelNamePattern?: string;
    levelValues?: OgmoValueDef[];
    defaultExportMode: string;
    compactExport: boolean;
    externalScript?: string;
    playCommand?: string;
    entityTags?: string[];
    layers: OgmoLayerDef[];
    entities: OgmoEntityDef[];
    tilesets: OgmoTilesetDef[];
}
/** OGMO Layer Definition */
export interface OgmoLayerDef {
    name: string;
    gridSize: {
        x: number;
        y: number;
    };
    exportID: string;
    definition: 'tile' | 'entity' | 'decal';
    /** For tile layers */
    tileset?: string;
    /** For entity layers */
    requiredTags?: string[];
    excludedTags?: string[];
    /** For decal layers */
    folder?: string;
    scaleable?: boolean;
    rotatable?: boolean;
    tintable?: boolean;
}
/** OGMO Entity Definition */
export interface OgmoEntityDef {
    name: string;
    exportID: string;
    limit: number;
    size: {
        x: number;
        y: number;
    };
    origin: {
        x: number;
        y: number;
    };
    originAnchored: boolean;
    shape: OgmoEntityShape;
    color: string;
    tileX: boolean;
    tileY: boolean;
    tileSize: {
        x: number;
        y: number;
    };
    resizeableX: boolean;
    resizeableY: boolean;
    rotatable: boolean;
    rotationDegrees: number;
    canFlipX: boolean;
    canFlipY: boolean;
    canSetColor: boolean;
    hasNodes: boolean;
    nodeLimit: number;
    nodeDisplay: 'path' | 'circuit' | 'fan' | 'none';
    nodeGhost: boolean;
    tags: string[];
    values: OgmoValueDef[];
    texture?: string;
    textureX?: number;
    textureY?: number;
}
export type OgmoEntityShape = {
    label: 'Rectangle' | 'Ellipse' | 'Cross' | 'Diamond' | 'Octagon' | 'Point';
} | {
    label: 'Ellipse';
} | {
    label: 'Cross';
} | {
    label: 'Diamond';
} | {
    label: 'Octagon';
} | {
    label: 'Point';
};
/** OGMO Tileset Definition */
export interface OgmoTilesetDef {
    name: string;
    path: string;
    image: string;
    tileWidth: number;
    tileHeight: number;
    tileSeparationX: number;
    tileSeparationY: number;
}
/** OGMO Value Definition (custom properties) */
export interface OgmoValueDef {
    name: string;
    definition: 'Bool' | 'Int' | 'Float' | 'String' | 'Text' | 'Enum' | 'Color' | 'FilePath';
    defaults: unknown;
    bounded?: boolean;
    min?: number;
    max?: number;
    choices?: string[];
}
/** OGMO 3 Level File */
export interface OgmoLevel {
    ogmoVersion: string;
    width: number;
    height: number;
    offsetX: number;
    offsetY: number;
    values?: Record<string, unknown>;
    layers: OgmoLayerInstance[];
}
/** OGMO Layer Instance */
export interface OgmoLayerInstance {
    name: string;
    _eid: string;
    offsetX: number;
    offsetY: number;
    gridCellWidth: number;
    gridCellHeight: number;
    gridCellsX: number;
    gridCellsY: number;
    /** Tile layers */
    tileset?: string;
    data?: number[];
    data2D?: number[][];
    dataCoords?: Array<[number, number]>;
    dataCoords2D?: Array<Array<[number, number]>>;
    exportMode?: '1D' | '2D' | 'CSV' | 'Coords (1D)' | 'Coords (2D)';
    arrayMode?: '1D' | '2D';
    /** Entity layers */
    entities?: OgmoEntityInstance[];
    /** Decal layers */
    decals?: OgmoDecalInstance[];
    /** Grid layer (for collision/pathfinding) */
    grid?: string[];
    grid2D?: string[][];
}
/** OGMO Entity Instance */
export interface OgmoEntityInstance {
    name: string;
    id: number;
    _eid: string;
    x: number;
    y: number;
    width?: number;
    height?: number;
    originX?: number;
    originY?: number;
    rotation?: number;
    flippedX?: boolean;
    flippedY?: boolean;
    color?: string;
    nodes?: Array<{
        x: number;
        y: number;
    }>;
    values?: Record<string, unknown>;
}
/** OGMO Decal Instance */
export interface OgmoDecalInstance {
    x: number;
    y: number;
    texture: string;
    scaleX?: number;
    scaleY?: number;
    rotation?: number;
    color?: string;
    originX?: number;
    originY?: number;
}
export declare class OgmoImporter extends SceneImporter {
    private project;
    private entityDefs;
    private tilesetDefs;
    private layerDefs;
    constructor();
    canHandle(filePath: string): boolean;
    import(options: ImportOptions): Promise<ImportResult>;
    parseFile(content: string | ArrayBuffer, filePath: string): Promise<ParsedScene | null>;
    validate(sourcePath: string): Promise<ImportError[]>;
    private isProjectFile;
    private isLevelFile;
    private indexDefinitions;
    private convertLevelToScene;
    private convertLevelToParsed;
    private convertLayer;
    private convertLayerToParsed;
    private convertTileLayer;
    private convertEntity;
    private convertEntityToParsed;
    private convertDecal;
    private convertGridLayer;
    private readFile;
    private resolvePath;
    private extractFileName;
}
export declare function createOgmoImporter(): OgmoImporter;
