// Version History
interface Version {
    version: number;
    versionId: string;
    versionName: string;
    versionDescription: string;
    timeStamp: string;
    createdBy: string;
}

type VersionHistory = Version[];


// Asset

interface Asset {
    modelUuid: string;
    modelName: string;
    assetId: string;
    position: [number, number, number];
    rotation: [number, number, number];
    isLocked: boolean;
    isCollidable: boolean;
    isVisible: boolean;
    opacity: number;
    animations?: string[];
    animationState?: {
        current: string;
        isPlaying: boolean;
        loopAnimation: boolean;
        isCompleted: boolean;
    };
    eventData?: {
        type: string;
        point?: {
            uuid: string;
            position: [number, number, number];
            rotation: [number, number, number];
        };
        points?: {
            uuid: string;
            position: [number, number, number];
            rotation: [number, number, number];
        }[];
    };
}

type Assets = Asset[];


// Wall-Asset

interface WallAsset {
    modelUuid: string;
    modelName: string;
    wallAssetType: string;
    assetId: string;
    wallUuid: string;
    position: [number, number, number];
    rotation: [number, number, number];
    isLocked: boolean;
    isVisible: boolean;
    opacity: number;
}

type WallAssets = WallAsset[];


// Point

type PointTypes = 'Aisle' | 'Wall' | 'Floor' | 'Zone';

interface Point {
    pointUuid: string;
    pointType: PointTypes;
    position: [number, number, number];
    layer: number;
}


// Wall

interface Decal {
    decalUuid: string;
    decalName: string;
    decalId: string;
    decalType: WallDecal | FloorDecal;
    decalPosition: [number, number, number];
    decalRotation: number;
    decalScale: number;
}

interface WallDecal {
    type: 'Wall';
    wallUuid: string;
}

interface FloorDecal {
    type: 'Floor';
    floorUuid: string;
}

interface Wall {
    wallUuid: string;
    points: [Point, Point];
    outsideMaterial: string;
    insideMaterial: string;
    wallThickness: number;
    wallHeight: number;
    decals: Decal[];
}

type Walls = Wall[];


// Floor

interface Floor {
    floorUuid: string;
    floorName: string;
    points: Point[];
    sideMaterial: string;
    topMaterial: string;
    floorDepth: number;
    isBeveled: boolean;
    bevelStrength: number;
    decals: Decal[];
}

type Floors = Floor[];


// Zone

interface Zone {
    zoneUuid: string;
    zoneName: string;
    zoneHeight: number;
    zoneColor: string;
    points: Point[];
    viewPortTarget: [number, number, number];
    viewPortPosition: [number, number, number];
}

type Zones = Zone[];


// Aisle

type AisleTypes = 'solid-aisle' | 'dashed-aisle' | 'stripped-aisle' | 'dotted-aisle' | 'arrow-aisle' | 'arrows-aisle' | 'arc-aisle' | 'circle-aisle' | 'junction-aisle';

type AisleColors = 'gray' | 'yellow' | 'green' | 'orange' | 'blue' | 'purple' | 'red' | '#66FF00' | 'yellow-black' | 'white-black'

interface SolidAisle {
    aisleType: 'solid-aisle';
    aisleColor: AisleColors;
    aisleWidth: number;
}

interface DashedAisle {
    aisleType: 'dashed-aisle';
    aisleColor: AisleColors;
    aisleWidth: number;
    dashLength: number;
    gapLength: number;
}

interface DottedAisle {
    aisleType: 'dotted-aisle';
    aisleColor: AisleColors;
    dotRadius: number;
    gapLength: number;
}

interface ArrowAisle {
    aisleType: 'arrow-aisle';
    aisleColor: AisleColors;
    aisleWidth: number;
}

interface ArrowsAisle {
    aisleType: 'arrows-aisle';
    aisleColor: AisleColors;
    aisleWidth: number;
    aisleLength: number;
    gapLength: number;
}

interface ArcAisle {
    aisleType: 'arc-aisle';
    aisleColor: AisleColors;
    aisleWidth: number;
    isFlipped: boolean;
}

interface CircleAisle {
    aisleType: 'circle-aisle';
    aisleColor: AisleColors;
    aisleWidth: number;
}

interface JunctionAisle {
    aisleType: 'junction-aisle';
    aisleColor: AisleColors;
    aisleWidth: number;
    isFlipped: boolean;
}

type AisleType = SolidAisle | DashedAisle | DottedAisle | ArrowAisle | ArrowsAisle | ArcAisle | CircleAisle | JunctionAisle;

interface Aisle {
    aisleUuid: string;
    points: [Point, Point];
    type: AisleType;
}

type Aisles = Aisle[];
