import { useNavigate } from "react-router-dom";
import { useUpdateStep } from "@/components/ChatsPath/hooks/useUpdateStep";
import routes from "@/routes";
import { IAnswer } from "@/components/ChatsPath/data";
import Answers from "@/components/ChatsPath/components/Answers";
import { useTranslations } from "@/hooks/translations";
import { ELocalesPlacement } from "@/locales";

function WhatYouWant() {
  const { translate } = useTranslations(ELocalesPlacement.Chats);
  useUpdateStep(8);
  const navigate = useNavigate();

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

  const answers: IAnswer[] = [
    {
      id: 1,
      value: "no",
      name: translate("no"),
      questionId: "whatYouWant",
      onClick: handleNext,
    },
    {
      id: 2,
      value: "yes",
      name: translate("yes"),
      questionId: "whatYouWant",
      onClick: handleNext,
    },
    {
      id: 3,
      value: "not_sure",
      name: translate("not_sure"),
      questionId: "whatYouWant",
      onClick: handleNext,
    },
  ];

  return (
    <>
      <h2 className={`chats-answers-title`}>
        {translate("/quiz/whatYouWant.title")}
      </h2>
      <Answers answers={answers} />
    </>
  );
}

export default WhatYouWant;
