"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingOverlay from "@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay";
import HeroCarouselLogo from "@/components/sections/hero/heroCarouselLogo/HeroCarouselLogo";
import ContactSplitForm from "@/components/sections/contact/ContactSplitForm";
import FooterLogoReveal from "@/components/sections/footer/FooterLogoReveal";
import Link from "next/link";

export default function ContactPage() {
  const navItems = [
    { name: "Home", id: "/" },
    { name: "Services", id: "services" },
    { name: "About", id: "about" },
    { name: "Contact", id: "contact" },
    { name: "Refill Prescription", id: "refill" },
  ];

  const handleContactSubmit = (data: Record<string, string>) => {
    console.log("Contact form submitted:", data);
  };

  return (
    <ThemeProvider
      defaultButtonVariant="bounce-effect"
      defaultTextAnimation="entrance-slide"
      borderRadius="soft"
      contentWidth="compact"
      sizing="mediumSizeLargeTitles"
      background="circleGradient"
      cardStyle="gradient-radial"
      primaryButtonStyle="double-inset"
      secondaryButtonStyle="glass"
      headingFontWeight="semibold"
    >
      {/* Navbar */}
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingOverlay
          brandName="Voss Rd Pharmacy"
          navItems={navItems}
          button={{
            text: "Call Now",
            href: "tel:+18324918088",
          }}
        />
      </div>

      {/* Hero Section */}
      <div id="hero" data-section="hero">
        <HeroCarouselLogo
          logoText="GET IN TOUCH"
          description="Have questions about our services or prescriptions? Contact our friendly team today. We're here to help and provide expert pharmaceutical guidance."
          buttons={[
            {
              text: "Call Us",
              href: "tel:+18324918088",
            },
            {
              text: "Visit Us",
              href: "contact",
            },
          ]}
          slides={[
            {
              imageSrc: "http://img.b2bpic.net/free-photo/building_1127-3295.jpg?_wi=2",
              imageAlt: "Voss Rd Pharmacy location",
            },
            {
              imageSrc: "http://img.b2bpic.net/free-photo/african-american-doctor-analyzing-medical-reports-with-her-colleagues-clinic_637285-11176.jpg?_wi=2",
              imageAlt: "Pharmacy team",
            },
            {
              imageSrc: "http://img.b2bpic.net/free-photo/aged-doctor-having-good-news-patient_1398-4032.jpg?_wi=2",
              imageAlt: "Patient consultation",
            },
          ]}
          autoplayDelay={5000}
          showDimOverlay={true}
        />
      </div>

      {/* Contact Form Section */}
      <div id="contact" data-section="contact">
        <ContactSplitForm
          title="Get in Touch with Us"
          description="Have a question about our services or prescriptions? Reach out to our friendly team. We're here to help! You can also call us directly at +1 832-491-8088 or visit our location at 2101 S Voss Rd #1500, Houston, TX 77057."
          inputs={[
            {
              name: "name",
              type: "text",
              placeholder: "Your Full Name",
              required: true,
            },
            {
              name: "phone",
              type: "tel",
              placeholder: "Phone Number",
              required: true,
            },
            {
              name: "email",
              type: "email",
              placeholder: "Email Address",
              required: true,
            },
            {
              name: "prescriptionNumber",
              type: "text",
              placeholder: "Prescription Number (Optional)",
              required: false,
            },
          ]}
          textarea={{
            name: "message",
            placeholder: "How can we help you today?",
            rows: 5,
            required: true,
          }}
          imageSrc="http://img.b2bpic.net/free-photo/building_1127-3295.jpg?_wi=3"
          imageAlt="Voss Rd Pharmacy location"
          mediaAnimation="slide-up"
          mediaPosition="right"
          buttonText="Send Message"
          useInvertedBackground={false}
          onSubmit={handleContactSubmit}
        />
      </div>

      {/* Footer */}
      <div id="footer" data-section="footer">
        <FooterLogoReveal
          logoText="Voss Rd Pharmacy"
          leftLink={{
            text: "Privacy Policy",
            href: "#",
          }}
          rightLink={{
            text: "Terms of Service",
            href: "#",
          }}
        />
      </div>
    </ThemeProvider>
  );
}