/**
 * @file SpriterImporter.ts
 * @description Spriter Pro Animation Importer
 * PRO-1.3: Scene Format Interoperability
 *
 * Spriter is a 2D animation tool for games.
 * Supports SCML (XML) and SCON (JSON) formats.
 *
 * File Types:
 * - *.scml - Spriter Character Map Lxml (XML format)
 * - *.scon - Spriter Character Object Notation (JSON format)
 */
import { SceneImporter, ImportOptions, ImportResult, ParsedScene, ImportError } from './SceneImporter';
/** Spriter Project (Root) */
export interface SpriterProject {
    spriter_data: SpriterData;
}
export interface SpriterData {
    scml_version?: string;
    scon_version?: string;
    generator?: string;
    generator_version?: string;
    folder: SpriterFolder[];
    entity: SpriterEntity[];
    tag_list?: SpriterTagList;
    var_defs?: SpriterVarDef[];
}
export interface SpriterFolder {
    id: number;
    name?: string;
    file: SpriterFile[];
}
export interface SpriterFile {
    id: number;
    name: string;
    width: number;
    height: number;
    pivot_x?: number;
    pivot_y?: number;
}
export interface SpriterEntity {
    id: number;
    name: string;
    obj_info?: SpriterObjInfo[];
    var_defs?: SpriterVarDef[];
    animation: SpriterAnimation[];
    character_map?: SpriterCharacterMap[];
}
export interface SpriterObjInfo {
    name: string;
    type?: 'sprite' | 'bone' | 'box' | 'point' | 'sound' | 'entity' | 'variable';
    w?: number;
    h?: number;
    pivot_x?: number;
    pivot_y?: number;
    frames?: SpriterObjFrame[];
    var_defs?: SpriterVarDef[];
}
export interface SpriterObjFrame {
    folder: number;
    file: number;
}
export interface SpriterVarDef {
    id: number;
    name: string;
    type: 'float' | 'int' | 'string';
    default_value?: number | string;
}
export interface SpriterAnimation {
    id: number;
    name: string;
    length: number;
    interval?: number;
    looping?: boolean;
    mainline: SpriterMainline;
    timeline?: SpriterTimeline[];
    soundline?: SpriterSoundline[];
    eventline?: SpriterEventline[];
    meta?: SpriterMeta;
}
export interface SpriterMainline {
    key: SpriterMainlineKey[];
}
export interface SpriterMainlineKey {
    id: number;
    time?: number;
    bone_ref?: SpriterRef[];
    object_ref?: SpriterRef[];
}
export interface SpriterRef {
    id: number;
    parent?: number;
    timeline: number;
    key: number;
    z_index?: number;
}
export interface SpriterTimeline {
    id: number;
    name: string;
    object_type?: 'sprite' | 'bone' | 'box' | 'point' | 'sound' | 'entity' | 'variable';
    obj?: number;
    key: SpriterTimelineKey[];
    meta?: SpriterTimelineMeta;
}
export interface SpriterTimelineKey {
    id: number;
    time?: number;
    spin?: number;
    curve_type?: 'instant' | 'linear' | 'quadratic' | 'cubic' | 'quartic' | 'quintic' | 'bezier';
    c1?: number;
    c2?: number;
    c3?: number;
    c4?: number;
    bone?: SpriterBone;
    object?: SpriterObject;
}
export interface SpriterBone {
    x?: number;
    y?: number;
    angle?: number;
    scale_x?: number;
    scale_y?: number;
    a?: number;
}
export interface SpriterObject {
    folder?: number;
    file?: number;
    x?: number;
    y?: number;
    angle?: number;
    scale_x?: number;
    scale_y?: number;
    pivot_x?: number;
    pivot_y?: number;
    a?: number;
    entity?: number;
    animation?: number;
    t?: number;
}
export interface SpriterSoundline {
    id: number;
    name?: string;
    key: SpriterSoundKey[];
}
export interface SpriterSoundKey {
    id: number;
    time?: number;
    object: {
        folder: number;
        file: number;
        trigger?: boolean;
        panning?: number;
        volume?: number;
    };
}
export interface SpriterEventline {
    id: number;
    name: string;
    key: SpriterEventKey[];
}
export interface SpriterEventKey {
    id: number;
    time?: number;
}
export interface SpriterMeta {
    varline?: SpriterVarline[];
    tagline?: SpriterTagline;
}
export interface SpriterTimelineMeta {
    varline?: SpriterVarline[];
    tagline?: SpriterTagline;
}
export interface SpriterVarline {
    id: number;
    def: number;
    key: SpriterVarKey[];
}
export interface SpriterVarKey {
    id: number;
    time?: number;
    val?: number | string;
}
export interface SpriterTagline {
    key: SpriterTagKey[];
}
export interface SpriterTagKey {
    id: number;
    time?: number;
    tag?: SpriterTag[];
}
export interface SpriterTag {
    id: number;
    t: number;
}
export interface SpriterTagList {
    tag: SpriterTagDef[];
}
export interface SpriterTagDef {
    id: number;
    name: string;
}
export interface SpriterCharacterMap {
    id: number;
    name: string;
    map?: SpriterMapInstruction[];
}
export interface SpriterMapInstruction {
    folder: number;
    file: number;
    target_folder?: number;
    target_file?: number;
}
export declare class SpriterImporter extends SceneImporter {
    private project;
    private fileMap;
    private folderMap;
    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 parseScml;
    private buildMaps;
    private convertEntityToScene;
    private convertAnimation;
    private convertEntityToParsed;
    private readFile;
    private extractFileName;
}
export declare function createSpriterImporter(): SpriterImporter;
