import Title from "@/components/Title";
import styles from "./styles.module.css";
import MainButton from "@/components/MainButton";
import { useNavigate } from "react-router-dom";
import routes from "@/routes";

function AlmostTherePage() {
  const navigate = useNavigate();

  const handleBack = () => {
    navigate(-1);
  };

  const handleNext = () => {
    navigate(`${routes.client.questionnaire()}/relationship_pattern/priority`);
  };

  return (
    <section className={`${styles.page} page`}>
      <img src="/magnifier.svg" alt="The magnifier" style={{ minHeight: "220px" }} />
      <div>
        <Title variant="h1" className={styles.title}>
          Almost there! <br /> Now let's tailor your plan by understanding the{" "}
          <span style={{ color: "#bb6cd9" }}>Relationship Pattern</span>.
        </Title>
        <p className={styles.text}>
          Please take your time when answering. Each response is used to craft
          your guidance plan.
        </p>
      </div>
      <div className={styles["buttons-container"]}>
        <MainButton
          className={`${styles.button} ${styles["back-button"]}`}
          onClick={handleBack}
        >
          Back
        </MainButton>
        <MainButton
          className={`${styles.button} ${styles["next-button"]}`}
          onClick={handleNext}
        >
          Next
        </MainButton>
      </div>
    </section>
  );
}

export default AlmostTherePage;
