"use client";

import { useRouter } from "next/navigation";
import { useTranslations } from "next-intl";

import { ROUTES } from "@/shared/constants/client-routes";

import { RetainingButton } from "../..";

import styles from "./Button.module.scss";

export default function Button() {
  const t = useTranslations("PlanCancelled");
  const router = useRouter();

  const handleButtonClick = () => {
    router.push(ROUTES.home());
  };

  return (
    <RetainingButton
      className={styles.button}
      active={true}
      onClick={handleButtonClick}
    >
      {t("button")}
    </RetainingButton>
  );
}
