import routes from "@/routes";
import styles from "./styles.module.scss";
import Title from "@/components/Title";
import Button from "../../components/Button";
import { useTranslations } from "@/hooks/translations";
import { useNavigate } from "react-router-dom";
import { ELocalesPlacement } from "@/locales";
import { selectors } from "@/store";
import { useSelector } from "react-redux";
import { getZodiacSignByDate } from "@/services/zodiac-sign";
import { usePreloadImages } from "@/hooks/preload/images";

function PalmsInformationPartner() {
  const { translate } = useTranslations(ELocalesPlacement.CompatibilityV3);
  const { partnerGender, partnerBirthdate } = useSelector(selectors.selectQuestionnaire);

  const zodiacSign = getZodiacSignByDate(partnerBirthdate);
  const navigate = useNavigate();

  usePreloadImages([
    "/v3/compatibility/hand-with-eye.svg"
  ])

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

  return (
    <div className={styles["page-container"]}>
      {/* {animationData && (
        <DotLottieReact
          className={`${styles["lottie-animation"]} ym-hide-content`}
          data={animationData}
          autoplay
          loop={false}
          width={1920}
        />
      )} */}
      <div className={styles.zodiac}>
        <img
          className={styles.image}
          // src={images(`zodiacs/${partnerGender}/${zodiacSign?.toUpperCase()}.webp`)}
          src={`/zodiac-signs/${partnerGender?.toLowerCase()}/${zodiacSign?.toLowerCase()}.svg`}
          alt="Zodiac sign"
        />
      </div>
      <Title variant="h2" className={styles.title}>
        {translate(`/palms-information-partner.${zodiacSign?.toLowerCase()}.title`)}
      </Title>
      <p className={styles.description}>
        {translate(`/palms-information-partner.${zodiacSign?.toLowerCase()}.description`)}
      </p>
      <Button onClick={handleNext}>
        {translate("next")}
      </Button>
      {/* <Policy>
        {translate("privacy_policy", {
          eulaLink: (
            <a
              href="https://aura.wit.life/terms"
              target="_blank"
              rel="noopener noreferrer"
            >
              {translate("eula_link")}
            </a>
          ),
          privacyLink: (
            <a
              href="https://aura.wit.life/privacy"
              target="_blank"
              rel="noopener noreferrer"
            >
              {translate("privacy_notice")}
            </a>
          ),
          clickHere: (
            <a
              href="https://aura.wit.life/"
              target="_blank"
              rel="noopener noreferrer"
            >
              {translate("policy_here")}
            </a>
          ),
        })}
      </Policy> */}
    </div>
  );
}

export default PalmsInformationPartner;
