"use client";

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

const navItems = [
  { name: "Home", id: "home" },
  { name: "Services", id: "services" },
  { name: "About", id: "about" },
  { name: "Contact", id: "contact" },
  { name: "WhatsApp", id: "https://wa.me/94769344607" },
];

const footerColumns = [
  {
    items: [
      { label: "Home", href: "/" },
      { label: "Services", href: "/services" },
      { label: "About", href: "/about" },
    ],
  },
  {
    items: [
      { label: "Contact Us", href: "/contact" },
      { label: "WhatsApp", href: "https://wa.me/94769344607" },
      { label: "Call Now", href: "tel:+94714099975" },
    ],
  },
  {
    items: [
      { label: "Privacy Policy", href: "#" },
      { label: "Terms & Conditions", href: "#" },
      { label: "Sitemap", href: "#" },
    ],
  },
  {
    items: [
      { label: "Nalanda Ellawala", href: "#" },
      { label: "Kuruwita, Sri Lanka", href: "#" },
      { label: "Est. 2003", href: "#" },
    ],
  },
];

export default function ContactPage() {
  const handleContactSubmit = (email: string) => {
    console.log("Contact form submitted with email:", email);
  };

  return (
    <ThemeProvider
      defaultButtonVariant="text-shift"
      defaultTextAnimation="reveal-blur"
      borderRadius="pill"
      contentWidth="small"
      sizing="largeSmall"
      background="none"
      cardStyle="inset"
      primaryButtonStyle="flat"
      secondaryButtonStyle="solid"
      headingFontWeight="normal"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleCentered
          navItems={navItems}
          button={{ text: "Call Now", href: "tel:+94714099975" }}
          brandName="Paramount Export"
        />
      </div>

      <div id="contact-form" data-section="contact-form">
        <ContactSplit
          tag="Get In Touch"
          tagIcon={Mail}
          tagAnimation="slide-up"
          title="Let's Discuss Your Project"
          description="Whether you're looking for custom woodwork, bulk timber orders, or project consultations, our team is ready to help. Contact us today for a free estimate and expert advice."
          background={{ variant: "radial-gradient" }}
          useInvertedBackground={false}
          imageSrc="http://img.b2bpic.net/free-photo/smiling-businessman-sitting-meeting-talking-phone_1262-18075.jpg?_wi=2"
          imageAlt="Professional business consultation"
          mediaAnimation="slide-up"
          mediaPosition="right"
          inputPlaceholder="your@email.com"
          buttonText="Send Inquiry"
          termsText="We respect your privacy. Your contact information will only be used to respond to your inquiry about our products and services."
          onSubmit={handleContactSubmit}
          ariaLabel="Contact form section"
        />
      </div>

      <div id="contact-info" data-section="contact-info" className="py-16 px-4">
        <div className="mx-auto max-w-3xl text-center">
          <h2 className="text-3xl font-bold mb-12 text-[#25190c]">Other Ways to Reach Us</h2>
          
          <div className="grid grid-cols-1 md:grid-cols-3 gap-8">
            <div className="p-6 bg-[#ffffff] rounded-2xl border border-[#e8cfa8] shadow-sm hover:shadow-md transition-shadow">
              <div className="flex justify-center mb-4">
                <Phone className="w-8 h-8 text-[#ff6207]" />
              </div>
              <h3 className="font-semibold text-lg mb-2 text-[#25190c]">Phone</h3>
              <a href="tel:+94714099975" className="text-[#ff6207] hover:underline">
                +94 71 409 9975
              </a>
            </div>

            <div className="p-6 bg-[#ffffff] rounded-2xl border border-[#e8cfa8] shadow-sm hover:shadow-md transition-shadow">
              <div className="flex justify-center mb-4">
                <MapPin className="w-8 h-8 text-[#ff6207]" />
              </div>
              <h3 className="font-semibold text-lg mb-2 text-[#25190c]">Location</h3>
              <p className="text-[#25190c]">
                Nalanda Ellawala<br />
                Kuruwita 70500<br />
                Sri Lanka
              </p>
            </div>

            <div className="p-6 bg-[#ffffff] rounded-2xl border border-[#e8cfa8] shadow-sm hover:shadow-md transition-shadow">
              <div className="flex justify-center mb-4">
                <Mail className="w-8 h-8 text-[#ff6207]" />
              </div>
              <h3 className="font-semibold text-lg mb-2 text-[#25190c]">WhatsApp</h3>
              <a href="https://wa.me/94769344607" target="_blank" rel="noopener noreferrer" className="text-[#ff6207] hover:underline">
                +94 76 934 4607
              </a>
            </div>
          </div>

          <div className="mt-12 p-8 bg-[#e8cfa8] rounded-2xl">
            <h3 className="text-xl font-semibold mb-3 text-[#25190c]">Business Hours</h3>
            <p className="text-[#25190c] mb-2">Monday - Friday: 8:00 AM - 5:00 PM</p>
            <p className="text-[#25190c] mb-2">Saturday: 9:00 AM - 2:00 PM</p>
            <p className="text-[#25190c]">Sunday: Closed</p>
          </div>
        </div>
      </div>

      <div id="footer" data-section="footer">
        <FooterLogoEmphasis
          columns={footerColumns}
          logoText="Paramount Export"
          ariaLabel="Site footer"
        />
      </div>
    </ThemeProvider>
  );
}