import React from "react";
import classes from "./classes.module.scss";
import NavigationLink from "../../NavigationLink";
import LogOutButton from "@Front/Components/DesignSystem/LogOutButton";

type IProps = {
	isOpen: boolean;
	closeModal: () => void;
};
type IState = {};

export default class ProfileModal extends React.Component<IProps, IState> {
	// TODO isEnabled depending on role given by DB
	public override render(): JSX.Element | null {
		if (!this.props.isOpen) return null;
		return (
			<>
				<div className={classes["background"]} onClick={this.props.closeModal} />
				<div className={classes["root"]}>
					<NavigationLink text="Mon compte" />
					<NavigationLink text="Gestion des utilisateurs" />
					<NavigationLink text="Gestion des offices" />
					<NavigationLink text="CGU" />
					<NavigationLink path={"/design-system"} text="Design System" />
					<NavigationLink path={"/"} text="Home" />
					<div className={classes["separator"]} />
					<LogOutButton />
				</div>
			</>
		);
	}
}
