"use client";

import Link from "next/link";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingInline from "@/components/navbar/NavbarLayoutFloatingInline";
import HeroBillboardGallery from "@/components/sections/hero/HeroBillboardGallery";
import TestimonialAboutCard from "@/components/sections/about/TestimonialAboutCard";
import FeatureCardTwentyFour from "@/components/sections/feature/FeatureCardTwentyFour";
import MetricCardEleven from "@/components/sections/metrics/MetricCardEleven";
import ProductCardTwo from "@/components/sections/product/ProductCardTwo";
import SocialProofOne from "@/components/sections/socialProof/SocialProofOne";
import TestimonialCardFifteen from "@/components/sections/testimonial/TestimonialCardFifteen";
import ContactText from "@/components/sections/contact/ContactText";
import FooterBase from "@/components/sections/footer/FooterBase";
import { Zap, Building2, Lightbulb, Award, CheckCircle, Shield } from "lucide-react";

export default function HomePage() {
  const navItems = [
    { name: "Home", id: "home" },
    { name: "About", id: "about" },
    { name: "Solutions", id: "solutions" },
    { name: "Projects", id: "projects" },
    { name: "Blog", id: "blog" },
    { name: "Contact", id: "contact" },
  ];

  const footerColumns = [
    {
      title: "Solutions",      items: [
        { label: "Industrial Automation", href: "/solutions" },
        { label: "Robot & Cobot Systems", href: "/solutions" },
        { label: "Packaging Machinery", href: "/solutions" },
        { label: "Smart Gate Systems", href: "/solutions" },
        { label: "Custom Engineering", href: "/solutions" },
      ],
    },
    {
      title: "Company",      items: [
        { label: "About Us", href: "/about" },
        { label: "Projects & Portfolio", href: "/" },
        { label: "Blog & Articles", href: "/" },
        { label: "Careers", href: "/" },
        { label: "Contact", href: "/contact" },
      ],
    },
    {
      title: "Resources",      items: [
        { label: "Case Studies", href: "/" },
        { label: "Technical Documentation", href: "/" },
        { label: "Support Portal", href: "/" },
        { label: "FAQ", href: "/" },
        { label: "Contact Support", href: "/contact" },
      ],
    },
    {
      title: "Contact",      items: [
        { label: "Phone: +66 2 123 4567", href: "tel:+6621234567" },
        { label: "Email: info@milestones.co.th", href: "mailto:info@milestones.co.th" },
        { label: "LINE: @milestones-tech", href: "https://line.me" },
        { label: "Bangkok, Thailand", href: "/" },
        { label: "Mon-Fri 8:00-18:00 (GMT+7)", href: "/" },
      ],
    },
  ];

  return (
    <ThemeProvider
      defaultButtonVariant="shift-hover"
      defaultTextAnimation="reveal-blur"
      borderRadius="pill"
      contentWidth="medium"
      sizing="large"
      background="grid"
      cardStyle="solid"
      primaryButtonStyle="shadow"
      secondaryButtonStyle="layered"
      headingFontWeight="semibold"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingInline
          brandName="Milestones Technologies"
          navItems={navItems}
          button={{
            text: "Request Quote",            href: "/contact"}}
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroBillboardGallery
          title="Automation Solutions for Industry & Smart Living"
          description="We provide industrial automation, robotic systems, smart gate solutions, and engineering services designed to improve efficiency, reliability, and long-term business performance. Transform your factory and operations with cutting-edge technology from Thailand's trusted automation leader."
          tag="INDUSTRIAL AUTOMATION & ENGINEERING"
          tagIcon={Zap}
          tagAnimation="slide-up"
          buttons={[
            {
              text: "Request a Quote",              href: "/contact"},
            {
              text: "Explore Solutions",              href: "/"},
          ]}
          buttonAnimation="slide-up"
          background={{ variant: "animated-grid" }}
          mediaItems={[
            {
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/industrial-robot-arm-performing-precise--1773981130354-3aca37a1.png?_wi=1",              imageAlt: "Industrial robot arm performing precise assembly on factory floor. Modern manufacturing facility wit"},
            {
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/high-speed-packaging-machinery-in-operat-1773981132057-91de9d07.png?_wi=1",              imageAlt: "High-speed packaging machinery in operation. Colorful packaged products moving through conveyor syst"},
            {
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/smart-gate-control-system-display-with-d-1773981131975-1ea8ba37.png?_wi=1",              imageAlt: "Smart gate control system display with digital interface showing access control and security feature"},
            {
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/collaborative-robot-cobot-working-alongs-1773981130740-14a987e9.png?_wi=1",              imageAlt: "Collaborative robot (cobot) working alongside human operator in assembly environment. Safe, modern w"},
            {
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/professional-engineering-team-working-on-1773981131698-7cf7cd5d.png?_wi=1",              imageAlt: "Professional engineering team working on factory automation project. Engineers examining blueprints "},
            {
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/completed-industrial-automation-installa-1773981131997-d20ced9d.png",              imageAlt: "Completed industrial automation installation showcasing integrated systems. Multiple conveyor lines,"},
          ]}
          mediaAnimation="blur-reveal"
        />
      </div>

      <div id="solutions" data-section="solutions">
        <FeatureCardTwentyFour
          tag="OUR CORE SOLUTIONS"
          tagIcon={Lightbulb}
          tagAnimation="slide-up"
          title="Comprehensive Automation & Engineering Solutions"
          description="We deliver five core solution categories designed to address the specific needs of factories, warehouses, and smart properties. Each solution is engineered for reliability, scalability, and long-term performance."
          features={[
            {
              id: "industrial-automation",              title: "Industrial Automation Systems",              author: "Manufacturing Excellence",              description: "End-to-end automation solutions for production lines, assembly processes, and manufacturing workflows. Increase productivity by up to 40% with our integrated control systems and real-time monitoring.",              tags: ["Production Lines", "Assembly", "Monitoring"],
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/industrial-automation-control-system-wit-1773981131808-cf06236c.png?_wi=1",              imageAlt: "Industrial automation control system with PLC controllers, variable frequency drives, and wiring. Cl"},
            {
              id: "robot-cobot",              title: "Robot & Cobot Automation",              author: "Precision Robotics",              description: "Cutting-edge robotic and collaborative robot solutions for precise, repetitive tasks. Perfect for warehousing, assembly, material handling, and specialized manufacturing applications.",              tags: ["Robotics", "Cobots", "Material Handling"],
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/advanced-collaborative-robot-with-articu-1773981131004-a16eab70.png?_wi=1",              imageAlt: "Advanced collaborative robot with articulated arms performing complex assembly task. Compact cobot d"},
            {
              id: "packaging-machinery",              title: "Packaging Machinery Solutions",              author: "Production Optimization",              description: "Advanced packaging systems for food, pharmaceutical, and consumer goods industries. High-speed, reliable packaging with quality control integration.",              tags: ["Packaging", "Quality Control", "High-Speed"],
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/state-of-the-art-automatic-packaging-sys-1773981131749-3c44c882.png?_wi=1",              imageAlt: "State-of-the-art automatic packaging system with multiple stations. Products being filled, sealed, a"},
            {
              id: "smart-gate",              title: "Smart Gate & Access Systems",              author: "Security & Convenience",              description: "Premium automatic gate solutions for residential, commercial, and industrial properties. Includes remote control, RFID integration, and advanced security features for modern smart living.",              tags: ["Smart Gates", "Access Control", "Security"],
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/modern-premium-automatic-sliding-gate-wi-1773981131408-069d06de.png?_wi=1",              imageAlt: "Modern premium automatic sliding gate with remote control and RFID reader. Beautiful residential or "},
            {
              id: "custom-engineering",              title: "Custom Engineering Solutions",              author: "Tailored Innovation",              description: "Bespoke automation and engineering solutions designed specifically for your unique operational requirements. From concept to implementation and ongoing support.",              tags: ["Engineering", "Customization", "Support"],
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/custom-engineered-automation-solution-be-1773981131850-3c480c9d.png?_wi=1",              imageAlt: "Custom engineered automation solution being installed at client site. Unique integrated system combi"},
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="why-choose-us" data-section="why-choose-us">
        <MetricCardEleven
          tag="WHY CHOOSE MILESTONES"
          tagIcon={Award}
          tagAnimation="slide-up"
          title="Proven Excellence in Industrial Automation"
          description="We combine technical expertise, proven track record, and customer-centric approach to deliver automation solutions that transform operations and drive business growth."
          metrics={[
            {
              id: "experience",              value: "15+",              title: "Years of Experience",              description: "Trusted by factories and businesses across Southeast Asia since 2009"},
            {
              id: "projects",              value: "500+",              title: "Projects Completed",              description: "Successful installations and implementations across all solution categories"},
            {
              id: "efficiency",              value: "40%",              title: "Average Productivity Increase",              description: "Clients report significant efficiency gains within first 6 months"},
            {
              id: "satisfaction",              value: "98%",              title: "Client Satisfaction Rate",              description: "Industry-leading customer satisfaction and long-term partnerships"},
            {
              id: "support",              value: "24/7",              title: "Technical Support",              description: "Round-the-clock support team to ensure zero downtime operations"},
            {
              id: "roi",              value: "8-12",              title: "Month ROI Timeline",              description: "Most clients achieve return on investment within 8-12 months"},
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="featured-projects" data-section="featured-projects">
        <ProductCardTwo
          tag="PORTFOLIO & INSTALLATIONS"
          tagIcon={CheckCircle}
          tagAnimation="slide-up"
          title="Featured Installation Works"
          description="Explore recent projects showcasing our capabilities across industrial automation, robotics, packaging systems, and smart gate installations."
          products={[
            {
              id: "project-1",              brand: "Automotive Manufacturer",              name: "Complete Assembly Line Automation",              price: "2.5M THB",              rating: 5,
              reviewCount: "12",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/complete-automotive-assembly-line-with-m-1773981131944-e95865db.png?_wi=1",              imageAlt: "Complete automotive assembly line with multiple robotic arms working in sequence. Complex multi-stat"},
            {
              id: "project-2",              brand: "Food Processing Plant",              name: "High-Speed Packaging System",              price: "1.8M THB",              rating: 5,
              reviewCount: "8",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/food-processing-facility-with-integrated-1773981131923-cf0c3dab.png?_wi=1",              imageAlt: "Food processing facility with integrated packaging machinery. Automated filling, sealing, and labeli"},
            {
              id: "project-3",              brand: "Electronics Warehouse",              name: "Cobot Material Handling System",              price: "1.2M THB",              rating: 5,
              reviewCount: "9",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/warehouse-with-collaborative-robots-mana-1773981131081-518034f7.png?_wi=1",              imageAlt: "Warehouse with collaborative robots managing material handling and logistics. Cobots picking and pla"},
            {
              id: "project-4",              brand: "Luxury Residential Complex",              name: "Smart Gate Access System",              price: "800K THB",              rating: 5,
              reviewCount: "15",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/luxury-residential-complex-entrance-with-1773981131885-7d86d7ce.png?_wi=1",              imageAlt: "Luxury residential complex entrance with installed smart gate system. Beautiful modern gate integrat"},
            {
              id: "project-5",              brand: "Chemical Manufacturing",              name: "Custom Robotic Production Line",              price: "3.2M THB",              rating: 5,
              reviewCount: "7",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/chemical-manufacturing-facility-with-rob-1773981131785-741649af.png?_wi=1",              imageAlt: "Chemical manufacturing facility with robotic production line. Safe automated chemical processing wit"},
            {
              id: "project-6",              brand: "Pharmaceutical Facility",              name: "Integrated Packaging & QC System",              price: "2.1M THB",              rating: 5,
              reviewCount: "11",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/pharmaceutical-facility-with-integrated--1773981135234-da2258a8.png?_wi=1",              imageAlt: "Pharmaceutical facility with integrated packaging and quality control system. Automated pill/tablet "},
          ]}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="trust-indicators" data-section="trust-indicators">
        <SocialProofOne
          tag="TRUSTED BY INDUSTRY LEADERS"
          tagIcon={Shield}
          tagAnimation="slide-up"
          title="Trusted by Thailand's Leading Companies"
          description="Milestones Technologies is the preferred automation partner for major manufacturers, food processors, chemical plants, and property developers across Southeast Asia."
          names={[
            "Thai Automotive Group",            "Bangkok Food Processing",            "Southeast Electronics Corp",            "Thai Chemical Industries",            "Bangkok Pharmaceutical",            "Thai Packaging Solutions",            "Regional Warehousing Co",            "Bangkok Property Developers"]}
          logos={[
            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/professional-corporate-logo-for-automoti-1773981130490-d851f847.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/food-processing-company-professional-log-1773981131364-3e0f1b67.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/electronics-corporation-professional-log-1773981133845-5e6dbc25.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/chemical-manufacturing-company-professio-1773981130788-63944153.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/pharmaceutical-company-professional-logo-1773981130764-ae871848.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/packaging-solutions-company-professional-1773981131039-83d43e45.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/warehouse-and-logistics-company-professi-1773981132381-3ecc38c8.png",            "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/real-estate-and-property-development-com-1773981130307-dd93d586.png"]}
          textboxLayout="default"
          useInvertedBackground={false}
          showCard={true}
          speed={40}
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardFifteen
          testimonial="Milestones Technologies transformed our production line. Within 6 months, we achieved 35% efficiency improvement and reduced defects by 28%. Their team was professional, responsive, and genuinely invested in our success. Highly recommended for any manufacturing facility."
          rating={5}
          author="Somchai Thaichai, Operations Director - Thai Automotive Group"
          avatars={[
            {
              src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/professional-headshot-of-thai-male-execu-1773981130512-3b9ae1e1.png",              alt: "Somchai Thaichai"},
            {
              src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/professional-headshot-of-thai-male-facto-1773981130089-2c759151.png",              alt: "Niran Suksomtree"},
            {
              src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/professional-headshot-of-thai-female-pro-1773981130978-eb2d4e1c.png",              alt: "Wanida Kachuay"},
            {
              src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BC5DoKtnbMRErIYJgmPK5zjs5w/professional-headshot-of-thai-male-busin-1773981131172-a7325777.png",              alt: "Pattarapol Moonkhan"},
          ]}
          ratingAnimation="slide-up"
          avatarsAnimation="slide-up"
          useInvertedBackground={false}
        />
      </div>

      <div id="cta" data-section="cta">
        <ContactText
          text="Ready to transform your operations with cutting-edge automation? Contact our solutions team today for a free consultation and custom proposal."
          background={{ variant: "animated-grid" }}
          buttons={[
            {
              text: "Request a Free Consultation",              href: "/contact"},
            {
              text: "Call Us Now",              href: "tel:+6621234567"},
          ]}
          useInvertedBackground={false}
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterBase
          logoText="Milestones Technologies"
          copyrightText="© 2025 Milestones Technologies. All rights reserved."
          columns={footerColumns}
        />
      </div>
    </ThemeProvider>
  );
}
