"use client";

import Link from "next/link";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleFullscreen from "@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen";
import HeroOverlay from "@/components/sections/hero/HeroOverlay";
import AboutMetric from "@/components/sections/about/AboutMetric";
import ProductCardThree from "@/components/sections/product/ProductCardThree";
import FeatureCardSixteen from "@/components/sections/feature/FeatureCardSixteen";
import TestimonialCardTwelve from "@/components/sections/testimonial/TestimonialCardTwelve";
import FaqDouble from "@/components/sections/faq/FaqDouble";
import FooterSimple from "@/components/sections/footer/FooterSimple";
import { Gamepad2, Flame, Smartphone, Star, Users, Download, Heart } from "lucide-react";

export default function HomePage() {
  const navItems = [
    { name: "Home", id: "home" },
    { name: "Browse Games", id: "browse" },
    { name: "Categories", id: "categories" },
    { name: "Top Rated", id: "toprated" },
    { name: "About", id: "about" },
  ];

  const footerColumns = [
    {
      title: "Games",
      items: [
        { label: "Browse All Games", href: "/browse" },
        { label: "Featured Games", href: "#featured-games" },
        { label: "Top Rated", href: "/browse" },
        { label: "New Releases", href: "/browse" },
      ],
    },
    {
      title: "Categories",
      items: [
        { label: "Action", href: "/categories" },
        { label: "Puzzle", href: "/categories" },
        { label: "Strategy", href: "/categories" },
        { label: "Casual", href: "/categories" },
      ],
    },
    {
      title: "Company",
      items: [
        { label: "About Us", href: "/about" },
        { label: "Contact", href: "mailto:play@knockgames.com" },
        { label: "Blog", href: "#" },
        { label: "Careers", href: "#" },
      ],
    },
    {
      title: "Legal",
      items: [
        { label: "Privacy Policy", href: "#" },
        { label: "Terms of Service", href: "#" },
        { label: "Cookie Policy", href: "#" },
        { label: "Disclaimer", href: "#" },
      ],
    },
  ];

  return (
    <ThemeProvider
      defaultButtonVariant="bounce-effect"
      defaultTextAnimation="reveal-blur"
      borderRadius="rounded"
      contentWidth="medium"
      sizing="mediumLargeSizeMediumTitles"
      background="floatingGradient"
      cardStyle="glass-depth"
      primaryButtonStyle="double-inset"
      secondaryButtonStyle="layered"
      headingFontWeight="medium"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleFullscreen
          navItems={navItems}
          brandName="Knock Games"
          bottomLeftText="Discover Amazing Games"
          bottomRightText="play@knockgames.com"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroOverlay
          title="Discover Your Next Favorite Android Game"
          description="Explore thousands of engaging Android games from the Play Store. Find action-packed adventures, brain-teasing puzzles, multiplayer thrills, and everything in between. Get instant access to reviews, ratings, and direct download links."
          tag="Play Store Featured"
          tagIcon={Gamepad2}
          tagAnimation="slide-up"
          buttons={[
            { text: "Browse Games", href: "/browse" },
            { text: "View Categories", href: "/categories" },
          ]}
          buttonAnimation="slide-up"
          imageSrc="http://img.b2bpic.net/free-vector/hand-drawn-mobile-app-concept_23-2148119484.jpg"
          imageAlt="Android gaming platform"
          showDimOverlay={false}
          showBlur={true}
          ariaLabel="Hero section showcasing Knock Games"
        />
      </div>

      <div id="about" data-section="about">
        <AboutMetric
          title="Why Choose Knock Games?"
          metrics={[
            { icon: Smartphone, label: "Android Games", value: "50,000+" },
            { icon: Star, label: "Average Rating", value: "4.8/5" },
            { icon: Users, label: "Active Players", value: "2M+" },
            { icon: Download, label: "Daily Downloads", value: "100K+" },
          ]}
          metricsAnimation="slide-up"
          useInvertedBackground={true}
          ariaLabel="About section with metrics"
        />
      </div>

      <div id="featured-games" data-section="featured-games">
        <ProductCardThree
          title="Featured Games This Week"
          description="Handpicked games trending on the Play Store right now. Download directly from Knock Games."
          tag="Hot Now"
          tagIcon={Flame}
          tagAnimation="opacity"
          textboxLayout="default"
          useInvertedBackground={false}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          carouselMode="buttons"
          products={[
            {
              id: "game-1",
              name: "Legends Arena",
              price: "Free",
              imageSrc: "http://img.b2bpic.net/free-photo/portrait-female-warrior-princess_23-2151663248.jpg?_wi=1",
              imageAlt: "Legends Arena game",
            },
            {
              id: "game-2",
              name: "Puzzle Master Pro",
              price: "Free",
              imageSrc: "http://img.b2bpic.net/free-vector/flat-design-escape-room-invitation_23-2149906790.jpg?_wi=1",
              imageAlt: "Puzzle Master Pro game",
            },
            {
              id: "game-3",
              name: "Infinite Runner",
              price: "Free",
              imageSrc: "http://img.b2bpic.net/free-photo/joyful-healthy-woman-earphones-listening-music-while-using-smartphone_8353-6938.jpg?_wi=1",
              imageAlt: "Infinite Runner game",
            },
          ]}
          buttons={[{ text: "View All Games", href: "/browse" }]}
          buttonAnimation="opacity"
          ariaLabel="Featured games section"
        />
      </div>

      <div id="categories" data-section="categories">
        <FeatureCardSixteen
          title="Explore Game Categories"
          description="From action and strategy to casual and educational games, find exactly what you're looking for."
          textboxLayout="default"
          animationType="slide-up"
          useInvertedBackground={true}
          negativeCard={{
            items: [
              "Limited game selection",
              "Poor user interface",
              "Slow downloads",
              "No reviews or ratings",
            ],
          }}
          positiveCard={{
            items: [
              "50,000+ curated games",
              "Beautiful, intuitive design",
              "Lightning-fast downloads",
              "Honest reviews and ratings",
            ],
          }}
          buttons={[{ text: "Browse Categories", href: "/categories" }]}
          buttonAnimation="slide-up"
          ariaLabel="Feature comparison section"
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardTwelve
          testimonials={[
            {
              id: "1",
              name: "Alex Johnson",
              imageSrc: "http://img.b2bpic.net/free-photo/smiling-young-traveler-man-with-headphones-around-his-neck-looking-front-isolated-purple-wall-with-copy-space_141793-119829.jpg",
              imageAlt: "happy gamer player portrait",
            },
            {
              id: "2",
              name: "Sarah Chen",
              imageSrc: "http://img.b2bpic.net/free-photo/medium-shot-woman-couch_23-2149005162.jpg",
              imageAlt: "woman gamer enthusiastic player",
            },
            {
              id: "3",
              name: "Marcus Williams",
              imageSrc: "http://img.b2bpic.net/free-photo/smiley-man-with-controller_23-2148963955.jpg",
              imageAlt: "man gamer casual player portrait",
            },
            {
              id: "4",
              name: "Emma Davis",
              imageSrc: "http://img.b2bpic.net/free-photo/side-view-woman-playing-with-her-phone_23-2150455204.jpg",
              imageAlt: "woman gamer content player",
            },
            {
              id: "5",
              name: "James Rodriguez",
              imageSrc: "http://img.b2bpic.net/free-photo/indian-single-player-having-fun-with-mobile-shooter-online-games-wearing-man-bun-casual_482257-134377.jpg",
              imageAlt: "man gamer portrait satisfied",
            },
            {
              id: "6",
              name: "Lisa Anderson",
              imageSrc: "http://img.b2bpic.net/free-photo/portrait-smiling-woman-wearing-headphones_23-2148397117.jpg",
              imageAlt: "woman gamer enthusiast portrait",
            },
          ]}
          cardTitle="Loved by Millions of Gamers"
          cardTag="Player Reviews"
          cardTagIcon={Heart}
          cardAnimation="blur-reveal"
          useInvertedBackground={false}
          ariaLabel="Player testimonials section"
        />
      </div>

      <div id="faq" data-section="faq">
        <FaqDouble
          title="Frequently Asked Questions"
          description="Find answers to common questions about Knock Games and our Android game collection."
          textboxLayout="default"
          useInvertedBackground={true}
          faqsAnimation="opacity"
          faqs={[
            {
              id: "faq-1",
              title: "Are all games on Knock Games free?",
              content: "Most games on Knock Games are free to download from the Play Store. Some games may have in-app purchases or premium versions, which will be clearly marked in the game details.",
            },
            {
              id: "faq-2",
              title: "How do I download games?",
              content: "Simply browse our catalog, find a game you like, and click the download link. You'll be directed to the Google Play Store where you can install the game directly on your Android device.",
            },
            {
              id: "faq-3",
              title: "Can I trust the game reviews?",
              content: "Yes! Our reviews are from real players and verified sources. We maintain strict quality standards to ensure authentic, helpful feedback about each game.",
            },
            {
              id: "faq-4",
              title: "How often are games updated?",
              content: "We update our game catalog daily with new releases, trending games, and top-rated titles from the Play Store. Check back regularly for fresh discoveries.",
            },
            {
              id: "faq-5",
              title: "Do you offer game recommendations?",
              content: "Absolutely! Browse our curated categories, trending section, and personalized recommendations based on your gaming preferences and history.",
            },
            {
              id: "faq-6",
              title: "Is Knock Games an official Play Store partner?",
              content: "Knock Games is an independent Android game discovery platform. All games link directly to the official Google Play Store for safe, secure downloads.",
            },
          ]}
          buttons={[{ text: "Contact Support", href: "mailto:support@knockgames.com" }]}
          buttonAnimation="opacity"
          ariaLabel="FAQ section"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterSimple
          columns={footerColumns}
          bottomLeftText="© 2024 Knock Games. All rights reserved."
          bottomRightText="Discover. Play. Enjoy."
          ariaLabel="Site footer"
        />
      </div>
    </ThemeProvider>
  );
}