import Quizzes from '../data/Quizzes.json';

export interface QuizInfo {
    id: number;
    title: string;

    pregunta1: string;
    res1: string[];
    correcta1: string;

    pregunta2: string;
    res2: string[];
    correcta2: string;

    pregunta3: string;
    res3: string[];
    correcta3: string;

    pregunta4: string;
    res4: string[];
    correcta4: string;

}

export const getQuizzes = () => Quizzes;

export const getQuiz = (id: number) => Quizzes.find(m => m.id === id);