/**
 * @file LDtkImporter.ts
 * @description Import LDtk (Level Designer Toolkit) files
 * PRO-1.3: Scene Format Interoperability
 *
 * Supports:
 * - LDtk project files (.ldtk)
 * - LDtk level files (.ldtkl)
 *
 * Features:
 * - World/Level hierarchy
 * - IntGrid layers
 * - Tile layers
 * - Entity layers
 * - Auto-layer rules
 * - Enums
 * - Level backgrounds
 */
import { SceneImporter, ImportOptions, ImportResult, ParsedScene, ParsedAsset, ImportError } from './SceneImporter';
interface LDtkTileRect {
    tilesetUid: number;
    x: number;
    y: number;
    w: number;
    h: number;
}
interface LDtkIntGridValue {
    value: number;
    identifier: string;
    color: string;
    tile?: LDtkTileRect;
    groupUid: number;
}
interface LDtkEntityDef {
    identifier: string;
    uid: number;
    tags: string[];
    exportToToc: boolean;
    allowOutOfBounds: boolean;
    doc?: string;
    width: number;
    height: number;
    resizableX: boolean;
    resizableY: boolean;
    minWidth?: number;
    maxWidth?: number;
    minHeight?: number;
    maxHeight?: number;
    keepAspectRatio: boolean;
    tileOpacity: number;
    fillOpacity: number;
    lineOpacity: number;
    hollow: boolean;
    color: string;
    renderMode: 'Rectangle' | 'Ellipse' | 'Tile' | 'Cross';
    showName: boolean;
    tilesetId?: number;
    tileRenderMode: 'Cover' | 'FitInside' | 'Repeat' | 'Stretch' | 'FullSizeCropped' | 'FullSizeUncropped' | 'NineSlice';
    tileRect?: LDtkTileRect;
    uiTileRect?: LDtkTileRect;
    nineSliceBorders: number[];
    maxCount: number;
    limitScope: 'PerLayer' | 'PerLevel' | 'PerWorld';
    limitBehavior: 'MoveLastOne' | 'PreventAdding' | 'DiscardOldOnes';
    pivotX: number;
    pivotY: number;
    fieldDefs: LDtkFieldDef[];
}
interface LDtkFieldDef {
    identifier: string;
    doc?: string;
    uid: number;
    type: string;
    isArray: boolean;
    canBeNull: boolean;
    arrayMinLength?: number;
    arrayMaxLength?: number;
    editorDisplayMode: string;
    editorDisplayScale: number;
    editorDisplayPos: string;
    editorLinkStyle: string;
    editorDisplayColor?: string;
    editorAlwaysShow: boolean;
    editorShowInWorld: boolean;
    editorCutLongValues: boolean;
    editorTextSuffix?: string;
    editorTextPrefix?: string;
    useForSmartColor: boolean;
    exportToToc: boolean;
    searchable: boolean;
    min?: number;
    max?: number;
    regex?: string;
    acceptFileTypes?: string[];
    defaultOverride?: unknown;
    textLanguageMode?: string;
    symmetricalRef: boolean;
    autoChainRef: boolean;
    allowOutOfLevelRef: boolean;
    allowedRefs: string;
    allowedRefsEntityUid?: number;
    allowedRefTags: string[];
    tilesetUid?: number;
}
interface LDtkTilesetDef {
    identifier: string;
    uid: number;
    relPath?: string;
    embedAtlas?: 'LdtkIcons';
    pxWid: number;
    pxHei: number;
    tileGridSize: number;
    spacing: number;
    padding: number;
    tags: string[];
    tagsSourceEnumUid?: number;
    enumTags: {
        enumValueId: string;
        tileIds: number[];
    }[];
    customData: {
        tileId: number;
        data: string;
    }[];
    savedSelections: {
        ids: number[];
        mode: string;
    }[];
    cachedPixelData?: Record<string, unknown>;
}
interface LDtkEnumDef {
    identifier: string;
    uid: number;
    values: LDtkEnumValue[];
    iconTilesetUid?: number;
    externalRelPath?: string;
    externalFileChecksum?: string;
    tags: string[];
}
interface LDtkEnumValue {
    id: string;
    tileRect?: LDtkTileRect;
    color: number;
}
export declare class LDtkImporter extends SceneImporter {
    private project;
    private tilesets;
    private entityDefs;
    private layerDefs;
    private enums;
    constructor();
    import(options: ImportOptions): Promise<ImportResult>;
    parseFile(content: string | ArrayBuffer, filePath: string): Promise<ParsedScene | ParsedAsset | null>;
    validate(sourcePath: string): Promise<ImportError[]>;
    private indexDefinitions;
    private getAllLevels;
    private loadExternalLevels;
    private convertLevelToScene;
    private convertLayer;
    private mapLayerType;
    private convertTile;
    private gridTilesToArray;
    private convertEntity;
    private convertFieldToComponent;
    private convertFieldInstances;
    private extractAssets;
    private readFile;
    /** Get IntGrid value definition by value */
    getIntGridValue(layerUid: number, value: number): LDtkIntGridValue | undefined;
    /** Get enum definition and values */
    getEnum(identifier: string): LDtkEnumDef | undefined;
    /** Get entity definition */
    getEntityDef(uid: number): LDtkEntityDef | undefined;
    /** Get tileset definition */
    getTileset(uid: number): LDtkTilesetDef | undefined;
}
export {};
