/**
 * @file Live2DImporter.ts
 * @description Live2D Cubism Model Importer
 * PRO-1.3: Scene Format Interoperability
 *
 * Live2D is a technology for animating 2D characters.
 * Supports Cubism 3.0+ model format.
 *
 * File Types:
 * - *.model3.json - Model settings
 * - *.moc3 - Model data (binary)
 * - *.physics3.json - Physics settings
 * - *.pose3.json - Pose settings
 * - *.exp3.json - Expression settings
 * - *.motion3.json - Motion data
 * - *.cdi3.json - Display info
 */
import { SceneImporter, ImportOptions, ImportResult, ParsedScene, ImportError } from './SceneImporter';
/** Live2D Model Settings (model3.json) */
export interface L2DModelSettings {
    Version: number;
    FileReferences: L2DFileReferences;
    Groups?: L2DGroup[];
    HitAreas?: L2DHitArea[];
}
export interface L2DFileReferences {
    Moc: string;
    Textures: string[];
    Physics?: string;
    Pose?: string;
    DisplayInfo?: string;
    Expressions?: L2DExpressionRef[];
    Motions?: Record<string, L2DMotionRef[]>;
    UserData?: string;
}
export interface L2DExpressionRef {
    Name: string;
    File: string;
}
export interface L2DMotionRef {
    File: string;
    FadeInTime?: number;
    FadeOutTime?: number;
    Sound?: string;
    MotionSync?: string;
}
export interface L2DGroup {
    Target: 'Parameter' | 'Part';
    Name: string;
    Ids: string[];
}
export interface L2DHitArea {
    Id: string;
    Name: string;
}
/** Live2D Physics Settings (physics3.json) */
export interface L2DPhysics {
    Version: number;
    Meta: L2DPhysicsMeta;
    PhysicsSettings: L2DPhysicsSetting[];
}
export interface L2DPhysicsMeta {
    PhysicsSettingCount: number;
    TotalInputCount: number;
    TotalOutputCount: number;
    VertexCount: number;
    EffectiveForces?: {
        Gravity: {
            X: number;
            Y: number;
        };
        Wind: {
            X: number;
            Y: number;
        };
    };
    PhysicsDictionary?: L2DPhysicsDictEntry[];
}
export interface L2DPhysicsDictEntry {
    Id: string;
    Name: string;
}
export interface L2DPhysicsSetting {
    Id: string;
    Input: L2DPhysicsInput[];
    Output: L2DPhysicsOutput[];
    Vertices: L2DPhysicsVertex[];
    Normalization: L2DPhysicsNormalization;
}
export interface L2DPhysicsInput {
    Source: L2DPhysicsParameter;
    Weight: number;
    Type: 'X' | 'Y' | 'Angle';
    Reflect: boolean;
}
export interface L2DPhysicsOutput {
    Destination: L2DPhysicsParameter;
    VertexIndex: number;
    Scale: number;
    Weight: number;
    Type: 'X' | 'Y' | 'Angle';
    Reflect: boolean;
}
export interface L2DPhysicsParameter {
    Target: 'Parameter' | 'Part';
    Id: string;
}
export interface L2DPhysicsVertex {
    Position: {
        X: number;
        Y: number;
    };
    Mobility: number;
    Delay: number;
    Acceleration: number;
    Radius: number;
}
export interface L2DPhysicsNormalization {
    Position: L2DPhysicsNormValue;
    Angle: L2DPhysicsNormValue;
}
export interface L2DPhysicsNormValue {
    Minimum: number;
    Default: number;
    Maximum: number;
}
/** Live2D Pose Settings (pose3.json) */
export interface L2DPose {
    Version: number;
    Type: 'Live2D Pose';
    FadeInTime?: number;
    Groups: L2DPoseGroup[][];
}
export interface L2DPoseGroup {
    Id: string;
    Link?: string[];
}
/** Live2D Expression (exp3.json) */
export interface L2DExpression {
    Version: number;
    Type: 'Live2D Expression';
    FadeInTime?: number;
    FadeOutTime?: number;
    Parameters?: L2DExpressionParameter[];
}
export interface L2DExpressionParameter {
    Id: string;
    Value: number;
    Blend?: 'Add' | 'Multiply' | 'Overwrite';
}
/** Live2D Motion (motion3.json) */
export interface L2DMotion {
    Version: number;
    Meta: L2DMotionMeta;
    Curves: L2DMotionCurve[];
    UserData?: L2DUserDataEvent[];
}
export interface L2DMotionMeta {
    Duration: number;
    Fps: number;
    Loop?: boolean;
    AreBeziersRestricted?: boolean;
    CurveCount: number;
    TotalSegmentCount: number;
    TotalPointCount: number;
    UserDataCount?: number;
    TotalUserDataSize?: number;
}
export interface L2DMotionCurve {
    Target: 'Model' | 'Parameter' | 'PartOpacity';
    Id: string;
    FadeInTime?: number;
    FadeOutTime?: number;
    Segments: number[];
}
export interface L2DUserDataEvent {
    Time: number;
    Value: string;
}
/** Live2D Display Info (cdi3.json) */
export interface L2DDisplayInfo {
    Version: number;
    Parameters?: L2DParameterInfo[];
    ParameterGroups?: L2DParameterGroupInfo[];
    Parts?: L2DPartInfo[];
}
export interface L2DParameterInfo {
    Id: string;
    GroupId?: string;
    Name?: string;
}
export interface L2DParameterGroupInfo {
    Id: string;
    GroupId?: string;
    Name?: string;
}
export interface L2DPartInfo {
    Id: string;
    Name?: string;
}
/** Live2D User Data */
export interface L2DUserData {
    Version: number;
    Meta: {
        UserDataCount: number;
        TotalUserDataSize: number;
    };
    UserData: L2DUserDataEntry[];
}
export interface L2DUserDataEntry {
    Target: 'ArtMesh' | 'DrawOrder';
    Id: string;
    Value: string;
}
export declare class Live2DImporter extends SceneImporter {
    private model;
    private physics;
    private pose;
    private displayInfo;
    private expressions;
    private motions;
    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 loadDependencies;
    private convertModelToScene;
    private convertModelToParsed;
    private convertMotionCurves;
    private getSegmentTypes;
    private countKeyframes;
    private readFile;
    private getBaseDirectory;
    private extractFileName;
}
export declare function createLive2DImporter(): Live2DImporter;
