import { Stat } from "@/interfaces/user";

export interface ITrainingContent {
    id: string;
    created_at: number;
    user: string;
    exams: {
        id: string;
        date: number;
        detailed_summary: string;
        performance_comment: string;
        score: number;
        module: string;
        stat_ids: string[];
        stats?: Stat[];
    }[];
    tip_ids: string[];
    tips?: ITrainingTip[];
    weak_areas: {
        area: string;
        comment: string;
    }[];
}

export interface ITrainingTip {
    id: string;
    tipCategory: string;
    tipHtml: string;
    standalone: boolean;
    exercise?: {
        question: string;
        highlightable: string;
        segments: WalkthroughConfigs[]
    }
}

export interface WalkthroughConfigs {
    html: string;
    wordDelay: number;
    holdDelay: number;
    highlight: string[];
}


export interface TimelineEvent {
    type: 'text' | 'highlight';
    start: number;
    end: number;
    segmentIndex: number;
    content?: string[];
}

export interface SegmentRef extends WalkthroughConfigs {
    words: string[];
    startTime: number;
    endTime: number;
}