export interface Flashcard {
    id: string
    front: string
    back: string
    status: 'new' | 'learning' | 'review'
}

export interface FlashcardSet {
    id: string
    title: string
    topic: string
    cards: Flashcard[]
    color: string // For UI theming
}

export interface TranscriptionTask {
    id: string
    audioUrl: string // In a real app, this would be a URL to an audio file
    text: string
    translation: string
}

export interface VisualRecognitionTask {
    id: string
    imageUrl: string
    description: string
    keywords: string[]
}

export interface ChatMessage {
    id: string
    role: 'user' | 'assistant'
    content: string
    timestamp: Date
}

export const MOCK_FLASHCARD_SETS: FlashcardSet[] = [
    {
        id: 'set-1',
        title: 'Basic Phrases',
        topic: 'Greetings & Essentials',
        color: 'from-blue-500 to-cyan-500',
        cards: [
            {
                id: '1',
                front: 'God morgen',
                back: 'Good morning',
                status: 'new'
            },
            { id: '2', front: 'Takk', back: 'Thank you', status: 'learning' },
            {
                id: '3',
                front: 'Unnskyld',
                back: 'Excuse me / Sorry',
                status: 'review'
            },
            {
                id: '4',
                front: 'Hva heter du?',
                back: 'What is your name?',
                status: 'new'
            },
            {
                id: '5',
                front: 'Jeg heter...',
                back: 'My name is...',
                status: 'learning'
            }
        ]
    },
    {
        id: 'set-2',
        title: 'Food & Dining',
        topic: 'Restaurant',
        color: 'from-orange-500 to-red-500',
        cards: [
            {
                id: '6',
                front: 'En kaffe, takk',
                back: 'A coffee, please',
                status: 'new'
            },
            {
                id: '7',
                front: 'Kan jeg få regningen?',
                back: 'Can I have the bill?',
                status: 'new'
            },
            { id: '8', front: 'Skål!', back: 'Cheers!', status: 'learning' }
        ]
    }
]

export const MOCK_TRANSCRIPTION_TASKS: TranscriptionTask[] = [
    {
        id: '1',
        audioUrl: 'mock-audio-1.mp3',
        text: 'Det er kaldt i dag.',
        translation: 'It is cold today.',
    },
    {
        id: '2',
        audioUrl: 'mock-audio-2.mp3',
        text: 'Kan jeg få en kaffe?',
        translation: 'Can I have a coffee?',
    },
]

export const MOCK_VISUAL_TASKS: VisualRecognitionTask[] = [
    {
        id: '1',
        imageUrl: 'https://images.unsplash.com/photo-1542178229-232320b9e831?q=80&w=600&auto=format&fit=crop', // Norwegian landscape
        description: 'A beautiful fjord with mountains in the background.',
        keywords: ['fjord', 'fjell', 'vann', 'natur'],
    },
]

export const MOCK_CHAT_HISTORY: ChatMessage[] = [
    {
        id: '1',
        role: 'assistant',
        content: 'Hei! Hvordan går det med deg i dag?',
        timestamp: new Date(Date.now() - 100000),
    },
    {
        id: '2',
        role: 'user',
        content: 'Det går bra, takk! Jeg lærer norsk.',
        timestamp: new Date(Date.now() - 80000),
    },
    {
        id: '3',
        role: 'assistant',
        content: 'Så hyggelig! Hva vil du snakke om?',
        timestamp: new Date(Date.now() - 60000),
    },
]

export interface Story {
    id: string
    title: string
    content: string // Full text with gaps marked as {{answer}}
    vocab: { word: string; translation: string }[]
    difficulty: 'Easy' | 'Medium' | 'Hard'
}

export const MOCK_STORIES: Story[] = [
    {
        id: 'story-1',
        title: 'En Dag i Oslo',
        content: "Idag er det {{sol}} i Oslo. Jeg går en {{tur}} i parken. Det er mange {{mennesker}} ute.",
        vocab: [
            { word: 'sol', translation: 'sun' },
            { word: 'tur', translation: 'walk/trip' },
            { word: 'mennesker', translation: 'people' }
        ],
        difficulty: 'Easy'
    },
    {
        id: 'story-2',
        title: 'På Restaurant',
        content: "Jeg vil gjerne {{bestille}} en pizza. Kan jeg få {{menyen}}? Maten smaker {{godt}}.",
        vocab: [
            { word: 'bestille', translation: 'order' },
            { word: 'menyen', translation: 'the menu' },
            { word: 'godt', translation: 'good' }
        ],
        difficulty: 'Medium'
    }
]

export interface Mission {
    id: string
    title: string
    objective: string
    keywords: string[]
    initialPrompt: string
}

export const MOCK_MISSIONS: Mission[] = [
    {
        id: 'mission-1',
        title: 'Order a Coffee',
        objective: 'Successfully order a specific type of coffee and a pastry at a cafe.',
        keywords: ['en kaffe', 'med melk', 'kanelbolle', 'takk'],
        initialPrompt: "Hei! Hva kan jeg hjelpe deg med i dag?"
    },
    {
        id: 'mission-2',
        title: 'Ask for Directions',
        objective: 'Find your way to the train station by asking a stranger.',
        keywords: ['unnskyld', 'togstasjonen', 'venstre', 'høyre', 'hvor er'],
        initialPrompt: "Unnskyld meg, ser du etter noe?"
    }
]

export interface VideoResult {
    id: string
    title: string
    thumbnail: string
    channel: string
    duration: string
}

export const MOCK_YOUTUBE_VIDEOS: VideoResult[] = [
    {
        id: 'video-1',
        title: 'Learn Norwegian in 30 Minutes - ALL the Basics You Need',
        thumbnail: 'https://img.youtube.com/vi/6X0t6r6v8qU/maxresdefault.jpg',
        channel: 'Learn Norwegian with NorwegianClass101.com',
        duration: '28:45'
    },
    {
        id: 'video-2',
        title: '100 Common Norwegian Words in Context',
        thumbnail: 'https://img.youtube.com/vi/S7lGvWbH9kE/maxresdefault.jpg',
        channel: 'Simple Norwegian',
        duration: '15:20'
    }
]

export interface SubtitleWord {
    text: string
    startTime: number // seconds
    endTime: number // seconds
}

// Mock subtitles for "video-1" (approximate synchronization for demo)
export const MOCK_SUBTITLES: SubtitleWord[] = [
    { text: "Hei", startTime: 1.0, endTime: 1.5 },
    { text: "alle", startTime: 1.6, endTime: 2.0 },
    { text: "sammen", startTime: 2.1, endTime: 2.6 },
    { text: "Velkommen", startTime: 3.0, endTime: 3.8 },
    { text: "til", startTime: 3.9, endTime: 4.1 },
    { text: "dette", startTime: 4.2, endTime: 4.6 },
    { text: "kurset", startTime: 4.7, endTime: 5.2 },
    { text: "Jeg", startTime: 6.0, endTime: 6.3 },
    { text: "heter", startTime: 6.4, endTime: 6.8 },
    { text: "Lars", startTime: 6.9, endTime: 7.4 },
    { text: "og", startTime: 7.5, endTime: 7.7 },
    { text: "i", startTime: 7.8, endTime: 7.9 },
    { text: "dag", startTime: 8.0, endTime: 8.4 },
    { text: "skal", startTime: 8.5, endTime: 8.8 },
    { text: "vi", startTime: 8.9, endTime: 9.1 },
    { text: "lære", startTime: 9.2, endTime: 9.6 },
    { text: "norsk", startTime: 9.7, endTime: 10.2 },
]

export interface HangmanGame {
    id: string
    word: string
    hint: string
    category: string
}

export const MOCK_HANGMAN_GAMES: HangmanGame[] = [
    { id: '1', word: 'BRØD', hint: 'Baked food made of flour, water, and yeast.', category: 'Food' },
    { id: '2', word: 'SYKKEL', hint: 'Two-wheeled vehicle powered by pedals.', category: 'Transport' },
    { id: '3', word: 'DATAMASKIN', hint: 'Electronic device for storing and processing data.', category: 'Technology' },
    { id: '4', word: 'VINTER', hint: 'The coldest season of the year.', category: 'Seasons' }
]

export interface SpeedChallenge {
    id: string
    title: string
    prompt: string
    duration: number
    validAnswers: string[]
}

export const MOCK_SPEED_CHALLENGES: SpeedChallenge[] = [
    {
        id: 'fruits',
        title: 'Fruit Frenzy',
        prompt: 'Type 3 fruits in Norwegian',
        duration: 10,
        validAnswers: ['eple', 'banan', 'appelsin', 'pære', 'druer', 'jordbær', 'ananas', 'mango', 'sitron']
    },
    {
        id: 'colors',
        title: 'Color Rush',
        prompt: 'Type 3 colors in Norwegian',
        duration: 10,
        validAnswers: ['rød', 'blå', 'grønn', 'gul', 'svart', 'hvit', 'lilla', 'oransje', 'rosa', 'brun']
    }
]

export const MOCK_STOP_THE_BUS_CATEGORIES = [
    "Mat (Food)",
    "Dyr (Animals)",
    "Byer (Cities)",
    "Land (Countries)",
    "Navn (Names)",
    "Yrker (Professions)",
    "Verktoy (Tools)",
    "Klær (Clothing)",
    "Farger (Colors)",
    "Møbler (Furniture)"
]
