"use client";

import Link from "next/link";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleCentered from "@/components/navbar/NavbarStyleCentered/NavbarStyleCentered";
import ContactSplitForm from "@/components/sections/contact/ContactSplitForm";
import FooterCard from "@/components/sections/footer/FooterCard";
import { Mail, Phone, MapPin } from "lucide-react";

export default function ContactPage() {
  const navItems = [
    { name: "Home", id: "home" },
    { name: "About", id: "about" },
    { name: "Courses", id: "courses" },
    { name: "Reviews", id: "reviews" },
    { name: "Contact", id: "contact" },
  ];

  const handleNavClick = (id: string) => {
    if (id === "home") {
      window.location.href = "/";
    } else if (id === "about") {
      window.location.href = "/#about-mentor";
    } else if (id === "courses") {
      window.location.href = "/#courses";
    } else if (id === "reviews") {
      window.location.href = "/#testimonials";
    } else if (id === "contact") {
      window.location.href = "/contact";
    }
  };

  return (
    <ThemeProvider
      defaultButtonVariant="bounce-effect"
      defaultTextAnimation="entrance-slide"
      borderRadius="soft"
      contentWidth="mediumSmall"
      sizing="large"
      background="grid"
      cardStyle="glass-elevated"
      primaryButtonStyle="shadow"
      secondaryButtonStyle="layered"
      headingFontWeight="semibold"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleCentered
          brandName="E2 Academy"
          navItems={navItems}
          button={{
            text: "Book Demo",            href: "/contact"}}
        />
      </div>

      <div id="contact" data-section="contact" className="mx-auto px-4 md:px-6">
        <ContactSplitForm
          title="Book Your Free Demo Class"
          description="Experience the E2 Academy teaching style and approach before enrolling. Limited demo slots available each week. Fill the form or reach out directly via WhatsApp."
          useInvertedBackground={false}
          imageSrc="http://img.b2bpic.net/free-vector/hand-drawn-brazilian-payment-book-template_23-2149890130.jpg"
          imageAlt="contact form inquiry message"
          mediaAnimation="slide-up"
          mediaPosition="left"
          inputs={[
            {
              name: "name",              type: "text",              placeholder: "Student's Name",              required: true,
            },
            {
              name: "class",              type: "text",              placeholder: "Current Class (8/9/10)",              required: true,
            },
            {
              name: "phone",              type: "tel",              placeholder: "Phone Number",              required: true,
            },
            {
              name: "email",              type: "email",              placeholder: "Parent's Email",              required: false,
            },
          ]}
          textarea={{
            name: "message",            placeholder: "Any specific concerns or requirements? (Optional)",            rows: 4,
            required: false,
          }}
          buttonText="Book Demo Class"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterCard
          logoText="E2 Academy"
          copyrightText="© 2025 E2 Academy. Building Mathematics Excellence. All rights reserved."
          socialLinks={[
            {
              icon: Phone,
              href: "tel:+919876543210",              ariaLabel: "Call E2 Academy"},
            {
              icon: Mail,
              href: "mailto:info@e2academy.in",              ariaLabel: "Email E2 Academy"},
            {
              icon: MapPin,
              href: "#",              ariaLabel: "Visit E2 Academy Location"},
          ]}
        />
      </div>
    </ThemeProvider>
  );
}