"use client";

import ReactLenis from "lenis/react";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingOverlay from "@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay";
import ContactSplitForm from "@/components/sections/contact/ContactSplitForm";
import FooterBase from "@/components/sections/footer/FooterBase";
import { Mail, Phone, Instagram } from "lucide-react"; // Import Lucide icons

export default function ContactPage() {
  const commonNavItems = [
    { name: "Domov", id: "/" },
    { name: "Práca", id: "/#work" },
    { name: "Služby", id: "/services" },
    { name: "O nás", id: "/about" },
    { name: "Kontakt", id: "/contact" }
  ];

  const commonFooterColumnsEnglish = [
    {
      title: "Company",      items: [
        { label: "About", href: "/about" },
        { label: "Services", href: "/services" },
        { label: "Work", href: "/#work" },
        { label: "Contact", href: "/contact" }
      ]
    },
    {
      title: "Services",      items: [
        { label: "Web Development", href: "/services" },
        { label: "SEO", href: "/services" },
        { label: "Branding", href: "/services" },
        { label: "UI/UX Design", href: "/services" }
      ]
    },
    {
      title: "Connect",      items: [
        { label: "Twitter", href: "/#" },
        { label: "LinkedIn", href: "/#" },
        { label: "Instagram", href: "/#" },
        { label: "Dribbble", href: "/#" }
      ]
    }
  ];

  return (
    <ThemeProvider
      defaultButtonVariant="text-stagger"
      defaultTextAnimation="entrance-slide"
      borderRadius="pill"
      contentWidth="medium"
      sizing="medium"
      background="none"
      cardStyle="glass-elevated"
      primaryButtonStyle="gradient"
      secondaryButtonStyle="glass"
      headingFontWeight="medium"
    >
      <ReactLenis root>
        <NavbarLayoutFloatingOverlay
          brandName="Grow With Social"
          navItems={commonNavItems}
        />

        <ContactSplitForm
          title="Kontaktujte nás"
          description="Radi počujeme od vás! Vyplňte formulár nižšie a my sa vám čoskoro ozveme."
          inputs={[
            { name: "name", type: "text", placeholder: "Vaše meno", required: true },
            { name: "email", type: "email", placeholder: "Váš e-mail", required: true },
            { name: "phone", type: "tel", placeholder: "Telefónne číslo (voliteľné)" }
          ]}
          textarea={{ name: "message", placeholder: "Vaša správa", rows: 5, required: true }}
          imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/default/templates/web-agency-2/dev-1.webp?_wi=2"
          imageAlt="Contact us image"
          buttonText="Odoslať správu"
          useInvertedBackground={false}
          mediaPosition="right"
          onSubmit={(data) => console.log("Contact form submitted with data:", data)}
        />

        {/* New section for displaying contact details */}
        <div id="contact-details" data-section="contact-details" className="py-16 lg:py-24 bg-card text-foreground flex flex-col items-center justify-center text-center px-4">
          <h2 className="text-4xl lg:text-5xl font-semibold mb-8">Naše kontaktné údaje</h2>
          <div className="flex flex-col md:flex-row gap-8 items-start md:items-center justify-center max-w-2xl w-full">
            <div className="flex items-center gap-2 text-lg">
              <Mail className="text-primary-cta" size={20} />
              <a href="mailto:growwithsocial.tm@gmail.com" className="hover:underline">growwithsocial.tm@gmail.com</a>
            </div>
            <div className="flex flex-col items-start gap-2 text-lg">
              <div className="flex items-center gap-2">
                <Phone className="text-primary-cta" size={20} />
                <a href="tel:+421911869922" className="hover:underline">0911869922</a>
              </div>
              <div className="flex items-center gap-2 ml-7">
                <a href="tel:+421944320697" className="hover:underline">0944320697</a>
              </div>
            </div>
            <div className="flex items-center gap-2 text-lg">
              <Instagram className="text-primary-cta" size={20} />
              <a href="https://www.instagram.com/growwithsocial.eu" target="_blank" rel="noopener noreferrer" className="hover:underline">@growwithsocial.eu</a>
            </div>
          </div>
        </div>

        <FooterBase
          logoText="Grow With Social"
          copyrightText="© 2026 | Grow With Social"
          columns={commonFooterColumnsEnglish}
        />
      </ReactLenis>
    </ThemeProvider>
  );
}
