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 GoalSetupPage() {
  const navigate = useNavigate();

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

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

  return (
    <section className={`${styles.page} page`}>
      <img
        src="/starry-sky.svg"
        alt="The starry sky"
        style={{ minHeight: "197px" }}
      />
      <div>
        <Title variant="h1" className={styles.title}>
          Great! You just set your first goal!
        </Title>
        <p className={styles.text}>
          Let's keep going so we can get to know you better.
        </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 GoalSetupPage;
