"use client";
import { useState, useEffect } from "react";

const interestingYes = () => {
  const yesArray = [
    "Absolutely, yes.",
    "Without a doubt.",
    "Of course.",
    "Definitely.",
    "Obviously!",
    "Certainly!",
    "Positively.",
    "100%",
  ];
  return yesArray[Math.floor(Math.random() * yesArray.length)];
}

export default function HomePage() {
  const [currentText, setCurrentText] = useState("");
  useEffect(() => {
    setCurrentText(interestingYes() ?? "Absolutely, yes.");
  }, []);
  const handleClick = () => {
    setCurrentText(interestingYes() ?? "Absolutely, yes.");
  };
  return (
    <main className="flex min-h-screen flex-col items-center justify-center
      bg-gradient-to-b from-pink-500 to-orange-400 text-white cursor-pointer">
      <h3 className="text-5xl font-extrabold tracking-tight
        text-white sm:text-[5rem] text-center" onClick={handleClick}>
        {currentText}
      </h3>
    </main>
  );
}
