/* eslint-disable @next/next/no-img-element */ import Icon from "@mdi/react"; import {mdiAccountVoice, mdiArrowLeft, mdiArrowRight, mdiBookOpen, mdiHeadphones, mdiPen} from "@mdi/js"; import {useEffect, useState} from "react"; import {Module} from "@/interfaces"; import clsx from "clsx"; import {useRouter} from "next/router"; import {errorButtonStyle, infoButtonStyle} from "@/constants/buttonStyles"; import ProfileLevel from "@/components/ProfileLevel"; import {User} from "@/interfaces/user"; import useExamStore from "@/stores/examStore"; import ProgressBar from "@/components/Low/ProgressBar"; import {BsBook, BsFileEarmarkText, BsHeadphones, BsMegaphone, BsPen, BsPencil, BsStar} from "react-icons/bs"; import {averageScore, formatModuleTotalStats, totalExams, totalExamsByModule} from "@/utils/stats"; import useStats from "@/hooks/useStats"; import Button from "@/components/Low/Button"; interface Props { user: User; onStart: (modules: Module[]) => void; } export default function Selection({user, onStart}: Props) { const [selectedModules, setSelectedModules] = useState([]); const {stats} = useStats(user?.id); const calculateAverageLevel = () => { return Object.keys(user!.levels).reduce((accumulator, current) => user!.levels[current as Module] + accumulator, 0) / 4; }; const router = useRouter(); const toggleModule = (module: Module) => { const modules = selectedModules.filter((x) => x !== module); setSelectedModules((prev) => (prev.includes(module) ? modules : [...modules, module])); }; return ( <>
{user.name}

{user.name}

{user.type}
{totalExamsByModule(stats, "reading")} Reading
{totalExamsByModule(stats, "listening")} Listening
{totalExamsByModule(stats, "writing")} Writing
{totalExamsByModule(stats, "speaking")} Speaking
About Exams This comprehensive test will assess your proficiency in reading, listening, writing, and speaking English. Be prepared to dive into a variety of interesting and challenging topics while showcasing your ability to communicate effectively in English. Master the vocabulary, grammar, and interpretation skills required to succeed in this high-level exam. Are you ready to demonstrate your mastery of the English language to the world?
Reading:

Expand your vocabulary, improve your reading comprehension and improve your ability to interpret texts in English.

Listening:

Improve your ability to follow conversations in English and your ability to understand different accents and intonations.

Writing:

Allow you to practice writing in a variety of formats, from simple paragraphs to complex essays.

Speaking:

You'll have access to interactive dialogs, pronunciation exercises and speech recordings.

); }