"use client";

import Link from "next/link";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingInline from "@/components/navbar/NavbarLayoutFloatingInline";
import ContactCenter from "@/components/sections/contact/ContactCenter";
import MetricCardThree from "@/components/sections/metrics/MetricCardThree";
import FooterBase from "@/components/sections/footer/FooterBase";
import { Mail, Phone, MapPin, Clock } from "lucide-react";

export default function ContactPage() {
  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: "/" },
      ],
    },
  ];

  const contactMetrics = [
    {
      id: "email",      icon: Mail,
      title: "Email Us",      value: "info@milestones.co.th"},
    {
      id: "phone",      icon: Phone,
      title: "Call Us",      value: "+66 2 123 4567"},
    {
      id: "location",      icon: MapPin,
      title: "Visit Us",      value: "Bangkok, Thailand"},
    {
      id: "hours",      icon: Clock,
      title: "Business Hours",      value: "Mon-Fri 8:00-18:00"},
  ];

  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="contact-form" data-section="contact-form">
        <ContactCenter
          tag="GET IN TOUCH"
          title="Contact Our Solutions Team"
          description="Have questions about our automation solutions? Need a custom quote? We're here to help. Fill out the form below and our team will get back to you within 24 hours."
          tagIcon={Mail}
          tagAnimation="slide-up"
          background={{ variant: "animated-grid" }}
          useInvertedBackground={false}
          inputPlaceholder="Enter your email"
          buttonText="Send Inquiry"
          termsText="By clicking Send Inquiry you're confirming that you agree with our Terms and Conditions."
        />
      </div>

      <div id="contact-info" data-section="contact-info">
        <MetricCardThree
          title="Contact Information & Support Options"
          description="Reach out to us through multiple channels. Choose the method that works best for you."
          metrics={contactMetrics}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={true}
        />
      </div>

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