import backgroundImage from "@Assets/images/background_refonte.svg";
import LogoIcon from "@Assets/logo_small_blue.svg";
import Button from "@Front/Components/DesignSystem/Button";
import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography";
import HelpBox from "@Front/Components/Elements/HelpBox";
import DefaultDoubleSidePage from "@Front/Components/LayoutTemplates/DefaultDoubleSidePage";
import Module from "@Front/Config/Module";
import Image from "next/image";
import Link from "next/link";

import BasePage from "../Base";
import classes from "./classes.module.scss";

export default class PageNotFound extends BasePage {
	public override render(): JSX.Element {
		return (
			<DefaultDoubleSidePage title={"Project Not Found"} image={backgroundImage} type="background" showHeader>
				<div className={classes["root"]}>
					<div className={classes["title-container"]}>
						<Image src={LogoIcon} alt="logo" width={56} />
						<Typography typo={ETypo.TITLE_H1} color={ETypoColor.TEXT_ACCENT}>
							Oups ! Page introuvable
						</Typography>
						<Typography typo={ETypo.TITLE_H5} color={ETypoColor.TEXT_PRIMARY}>
							Il semble que la page que vous recherchez n'existe pas ou a été déplacée.
						</Typography>
					</div>
					<div className={classes["content"]}>
						<div className={classes["text"]}>
							<Typography typo={ETypo.TEXT_LG_SEMIBOLD} color={ETypoColor.TEXT_PRIMARY}>
								Pas de panique ! Voici ce que vous pouvez faire :
							</Typography>
							<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.TEXT_SECONDARY}>
								• Retourner à la page d'accueil en cliquant sur le bouton ci-dessous.
							</Typography>
							<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.TEXT_SECONDARY}>
								• Contactez-nous si vous avez besoin d'aide.
							</Typography>
						</div>
						<Link href={Module.getInstance().get().modules.pages.Home.props.path}>
							<Button>Retour à l'accueil</Button>
						</Link>
					</div>
					<HelpBox
						title="Vous avez des questions ?"
						description="Notre équipe de support est là pour vous aider."
						//Button with onclick that redirect to a custom url
						button={{ text: "Contactez le support", onClick: () => window.open("https://tally.so/r/mBGaNY") }}
					/>
				</div>
			</DefaultDoubleSidePage>
		);
	}
}
