import Answers from "@/components/ChatsPath/components/Answers";
import { useNavigate } from "react-router-dom";
import routes from "@/routes";
import { useUpdateStep } from "@/components/ChatsPath/hooks/useUpdateStep";
import { whatEmotionAnswers } from "@/components/ChatsPath/data/whatEmotionAnswers";

function WhatEmotion() {
  useUpdateStep(7);
  const navigate = useNavigate();

  const handleNext = () => {
    navigate(routes.client.chatsAnswerHub());
  };

  const answers = whatEmotionAnswers.map((answer) => {
    return {
      ...answer,
      onClick: handleNext,
    };
  });

  return (
    <>
      <h2 className="chats-answers-title">
        Which emotion best describes you in the moment?
      </h2>
      <Answers answers={answers} />
    </>
  );
}

export default WhatEmotion;
