"use client";

import Link from "next/link";
import { Sparkles, CheckCircle, Award, Mail, Package } from "lucide-react";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleCentered from "@/components/navbar/NavbarStyleCentered/NavbarStyleCentered";
import HeroLogoBillboard from "@/components/sections/hero/HeroLogoBillboard";
import FeatureCardTwentyFour from "@/components/sections/feature/FeatureCardTwentyFour";
import MetricCardSeven from "@/components/sections/metrics/MetricCardSeven";
import ProductCardTwo from "@/components/sections/product/ProductCardTwo";
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 HomePage() {
  const handleNavClick = (id: string) => {
    if (id.startsWith("http") || id.includes("@")) {
      return;
    }
    const element = document.getElementById(id);
    if (element) {
      element.scrollIntoView({ behavior: "smooth" });
    }
  };

  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="home" data-section="hero">
        <HeroLogoBillboard
          logoText="Paramount Export"
          description="From raw treated timber to custom interior masterpieces. Mastering woodworking since 2003."
          buttons={[
            { text: "Request a Free Estimate", href: "/contact" },
            { text: "Call Now: +94 71 409 9975", href: "tel:+94714099975" },
          ]}
          background={{ variant: "sparkles-gradient" }}
          imageSrc="http://img.b2bpic.net/free-photo/carpenter-operating-stationary-power-planer-processing-wooden-plank-making-sawdust_1163-3150.jpg?_wi=1"
          imageAlt="CNC woodworking machinery in action"
          frameStyle="card"
          mediaAnimation="slide-up"
          buttonAnimation="slide-up"
          ariaLabel="Hero section - Paramount Export Industries"
        />
      </div>

      <div id="services" data-section="services">
        <FeatureCardTwentyFour
          title="Our Services & Products"
          description="Comprehensive woodworking solutions for residential, commercial, and industrial applications"
          tag="Manufacturing Excellence"
          tagIcon={Sparkles}
          tagAnimation="slide-up"
          features={[
            {
              id: "1",
              title: "Custom CNC Woodwork",
              author: "Expert Craftsmanship",
              description:
                "Precision-cut timber using advanced CNC machinery combined with traditional craftsmanship techniques",
              tags: ["CNC", "Custom", "Precision"],
              imageSrc:
                "http://img.b2bpic.net/free-photo/view-modern-futuristic-work-space-with-furniture_23-2151797706.jpg?_wi=1",
              imageAlt: "Office furniture and custom woodwork",
            },
            {
              id: "2",
              title: "Kitchen & Furniture Design",
              author: "Interior Solutions",
              description:
                "Custom kitchen cabinets, home furniture, and office solutions tailored to your specifications",
              tags: ["Design", "Interior", "Custom"],
              imageSrc:
                "http://img.b2bpic.net/free-photo/contrast-wood-stone-modern-furniture-premium-textures_169016-71185.jpg?_wi=1",
              imageAlt: "Modern kitchen with custom cabinetry",
            },
            {
              id: "3",
              title: "Doors & Windows",
              author: "Architectural",
              description:
                "Premium wooden doors and window frames for residential and commercial projects",
              tags: ["Doors", "Windows", "Premium"],
              imageSrc:
                "http://img.b2bpic.net/free-photo/man-antique-store-side-view_23-2149640693.jpg?_wi=1",
              imageAlt: "Wooden doors and architectural elements",
            },
            {
              id: "4",
              title: "Timber Supply",
              author: "Quality Materials",
              description:
                "Seasoned mahogany, treated rubber wood, and specialty timber for contractors and builders",
              tags: ["Supply", "Timber", "Quality"],
              imageSrc:
                "http://img.b2bpic.net/free-photo/carpentry-concept_23-2147773751.jpg",
              imageAlt: "Timber stack and quality materials",
            },
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
          ariaLabel="Services and products section"
        />
      </div>

      <div id="about" data-section="process">
        <FeatureCardTwentyFour
          title="From Design to Completion"
          description="Our proven process ensures quality, precision, and timely delivery for every project"
          tag="Process"
          tagIcon={CheckCircle}
          tagAnimation="slide-up"
          features={[
            {
              id: "1",
              title: "Design Consultation",
              author: "Step 1",
              description:
                "Collaborate with our expert team to understand your vision and requirements",
              tags: ["Design", "Consultation", "Planning"],
              imageSrc:
                "http://img.b2bpic.net/free-photo/crop-people-making-corrections-draft_23-2147785621.jpg",
              imageAlt: "Design consultation and planning",
            },
            {
              id: "2",
              title: "Precision Cutting",
              author: "Step 2",
              description:
                "Advanced CNC machinery combined with skilled craftsmanship ensures perfect dimensions",
              tags: ["CNC", "Precision", "Engineering"],
              imageSrc:
                "http://img.b2bpic.net/free-photo/view-modern-futuristic-work-space-with-furniture_23-2151797706.jpg?_wi=2",
              imageAlt: "CNC cutting and precision engineering",
            },
            {
              id: "3",
              title: "Treatment & Seasoning",
              author: "Step 3",
              description:
                "Professional seasoning and chemical treatment process for durability and quality",
              tags: ["Treatment", "Quality", "Durability"],
              imageSrc:
                "http://img.b2bpic.net/free-photo/wood-bars_23-2147773351.jpg?_wi=1",
              imageAlt: "Wood treatment and seasoning process",
            },
            {
              id: "4",
              title: "Quality Inspection & Delivery",
              author: "Step 4",
              description:
                "Rigorous quality checks followed by professional delivery and installation support",
              tags: ["Quality", "Delivery", "Service"],
              imageSrc:
                "http://img.b2bpic.net/free-photo/woodworking-plant-with-wood-sawing-machine-poster-about-woodworking-manufacturing_166373-9094.jpg?_wi=1",
              imageAlt: "Production and quality control",
            },
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
          ariaLabel="Our process section"
        />
      </div>

      <div id="credentials" data-section="metrics">
        <MetricCardSeven
          title="Trust Signals & Credentials"
          description="Two decades of excellence in woodworking and timber supply with proven track record"
          tag="Industry Leadership"
          tagIcon={Award}
          tagAnimation="slide-up"
          metrics={[
            {
              id: "1",
              value: "20+",
              title: "Years of Industry Excellence",
              items: [
                "Established in 2003",
                "Continuous operations",
                "Proven expertise",
              ],
            },
            {
              id: "2",
              value: "5.0",
              title: "Google Rating",
              items: [
                "Verified customer reviews",
                "Trusted quality",
                "Industry recognition",
              ],
            },
            {
              id: "3",
              value: "100%",
              title: "Export-Ready Production",
              items: [
                "International standards",
                "Bulk supply capacity",
                "Premium quality control",
              ],
            },
            {
              id: "4",
              value: "Kuruwita",
              title: "Strategic Industrial Zone Location",
              items: [
                "Nalanda Ellawala facility",
                "Modern infrastructure",
                "Easy logistics",
              ],
            },
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
          ariaLabel="Trust signals and credentials section"
        />
      </div>

      <div id="products" data-section="products">
        <ProductCardTwo
          title="Premium Timber & Materials"
          description="Explore our premium selection of seasoned, treated, and specialty timber products"
          tag="Materials"
          tagIcon={Package}
          tagAnimation="slide-up"
          products={[
            {
              id: "1",
              brand: "Paramount Export",
              name: "Seasoned Mahogany Planks",
              price: "Premium Grade",
              rating: 5,
              reviewCount: "Export Ready",
              imageSrc:
                "http://img.b2bpic.net/free-photo/iron-stripes-with-copy-space-background_23-2148744322.jpg?_wi=1",
              imageAlt: "Premium seasoned mahogany timber",
            },
            {
              id: "2",
              brand: "Paramount Export",
              name: "Treated Rubber Wood",
              price: "Industrial Grade",
              rating: 5,
              reviewCount: "Bulk Supply",
              imageSrc:
                "http://img.b2bpic.net/free-photo/wood-bars_23-2147773351.jpg?_wi=2",
              imageAlt: "Treated rubber wood planks",
            },
            {
              id: "3",
              brand: "Paramount Export",
              name: "Shuttering Planks",
              price: "Construction Grade",
              rating: 5,
              reviewCount: "Heavy Duty",
              imageSrc:
                "http://img.b2bpic.net/free-photo/tenerife-canary-islands-spain-january-15-2024_58702-16667.jpg?_wi=1",
              imageAlt: "Shuttering timber planks",
            },
            {
              id: "4",
              brand: "Paramount Export",
              name: "Lunumidella Ceiling Wood",
              price: "Specialty Grade",
              rating: 5,
              reviewCount: "Architectural",
              imageSrc:
                "http://img.b2bpic.net/free-photo/wooden-closet-with-sheets-ceiling_23-2147625763.jpg",
              imageAlt: "Lunumidella ceiling wood",
            },
          ]}
          gridVariant="uniform-all-items-equal"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
          ariaLabel="Premium products section"
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactSplit
          tag="Get In Touch"
          tagIcon={Mail}
          tagAnimation="slide-up"
          title="Inquire About Your Timber Needs"
          description="Connect with us for custom quotes, bulk orders, or project consultations. For fastest response, call us directly."
          background={{ variant: "radial-gradient" }}
          useInvertedBackground={false}
          imageSrc="http://img.b2bpic.net/free-photo/smiling-businessman-sitting-meeting-talking-phone_1262-18075.jpg?_wi=1"
          imageAlt="Professional business consultation"
          mediaAnimation="slide-up"
          mediaPosition="right"
          inputPlaceholder="Your email address"
          buttonText="Subscribe"
          termsText="We respect your privacy. Contact details will only be used for timber and product inquiries."
          onSubmit={handleContactSubmit}
          ariaLabel="Contact and newsletter section"
        />
      </div>

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