export type MessageType = "user" | "model";
export type QSView = 'list' | 'chat' | 'ghostwritter' | 'dictionary' | 'synonyms' | 'conjugator' | 'inspiration';
export type ConversationType = 'dictionary' | 'synonyms' | 'conjugator' | 'chatbot' | 'inspire';

export interface Message {
    id: number;
    type: MessageType;
    message: string;
    date: string;
}

export interface Conversation {
    id: string;
    title?: string;
    date?: string;
    type?: ConversationType;
    messages: Message[];
    status: number;
    totalPrice?: number;
    useYourKey?: boolean;
}

export interface AIGeneratedTextData {
    totalCost: number;
    response: string;
}

export interface AIResponseWithCredits<T> {
    useYourKey: boolean;
    totalPrice: number;
    data: T;
}

export interface AIDictionary extends AIResponseWithCredits<DictionaryAIResponse> {
}

export interface AIGeneratedText extends AIResponseWithCredits<AIGeneratedTextData> {
}

export interface AIInspire extends AIResponseWithCredits<InspireAIResponse> {
}

export interface AISynonyms extends AIResponseWithCredits<SynonymsAIResponse> {
}

export interface ConjugationTenses {
    [tense: string]: {
        firstPersonSingular?: string;
        secondPersonSingular?: string;
        thirdPersonSingular?: string;
        firstPersonPlural?: string;
        secondPersonPlural?: string;
        thirdPersonPlural?: string;
        présent?: string;
        passé?: string;
    } | string;
}

export interface ConjugationResponse {
    conjugations: {
        [mode: string]: ConjugationTenses;
    };
}

export interface AIVerbConjugation extends AIResponseWithCredits<ConjugationResponse> {
}

export interface InspireAIResponse {
    ideas: {
        idea: string;
        reason: string;
        relatedTo: string;
    }[];
}

export interface DictionaryAIResponse {
    word: string;
    definition: string;
    example: string;
    literaryUsage: string;
}

export interface SynonymAI {
    word: string;
    context: string;
}

export interface SynonymsAIResponse {
    words: SynonymAI[];
}

export interface InspirationAIIdea {
    idea: string;
    reason: string;
    relatedTo: string;
}

export interface ConversationProps {
    id: string;
    mode: string;
    title: string;
    startDate: string;
    status: number;
}

export interface QuillSenseSettingsProps {
    quillsenseEnabled: boolean;
    advancedPrompt: string | null;
}
