"use client";

import Link from "next/link";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingInline from "@/components/navbar/NavbarLayoutFloatingInline";
import ContactSplitForm from "@/components/sections/contact/ContactSplitForm";
import FooterMedia from "@/components/sections/footer/FooterMedia";

export default function ContactPage() {
  const navItems = [
    { name: "Home", id: "home" },
    { name: "About", id: "about" },
    { name: "Menu", id: "menu" },
    { name: "Reviews", id: "reviews" },
    { name: "Gallery", id: "gallery" },
    { name: "Contact", id: "contact" },
  ];

  const footerColumns = [
    {
      title: "Restaurant / Restoranti",
      items: [
        { label: "Home", href: "/" },
        { label: "Menu", href: "/menu" },
        { label: "Gallery", href: "/gallery" },
        { label: "Reviews", href: "#reviews" },
      ],
    },
    {
      title: "Contact / Kontakt",
      items: [
        { label: "Phone: +355 68 204 2026", href: "tel:+35568204202026" },
        { label: "Address: Rruga Viktor Eftemiu 8, Tiranë", href: "#" },
        { label: "Get Directions", href: "#" },
        { label: "Book Table", href: "/contact" },
      ],
    },
    {
      title: "Hours / Oraet",
      items: [
        { label: "Monday - Sunday", href: "#" },
        { label: "Open - Closes 6:30 PM", href: "#" },
        { label: "Dine-in Available", href: "#" },
        { label: "Takeout Available", href: "#" },
      ],
    },
    {
      title: "Legal / Ligjore",
      items: [
        { label: "Privacy Policy", href: "#" },
        { label: "Terms of Service", href: "#" },
        { label: "Contact", href: "/contact" },
      ],
    },
  ];

  const handleSubmit = (data: Record<string, string>) => {
    console.log("Reservation submitted:", data);
    // Handle form submission
  };

  return (
    <ThemeProvider
      defaultButtonVariant="text-shift"
      defaultTextAnimation="reveal-blur"
      borderRadius="soft"
      contentWidth="small"
      sizing="mediumLargeSizeMediumTitles"
      background="none"
      cardStyle="gradient-radial"
      primaryButtonStyle="gradient"
      secondaryButtonStyle="glass"
      headingFontWeight="bold"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingInline
          brandName="Mensa Gjyshi"
          navItems={navItems}
          button={{ text: "Book Table", href: "/contact" }}
          animateOnLoad
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactSplitForm
          title="Book Your Table / Rezervoni Tryezën Tuaj"
          description="Contact us to make a reservation or send us your questions / Na kontaktoni për të bërë një rezervim ose për të dërguar pyetjet tuaja"
          inputs={[
            {
              name: "name",
              type: "text",
              placeholder: "Your Name / Emri Juaj",
              required: true,
            },
            {
              name: "email",
              type: "email",
              placeholder: "Your Email / Email Juaj",
              required: true,
            },
            {
              name: "phone",
              type: "tel",
              placeholder: "+355 68 204 2026 / Phone",
              required: true,
            },
            {
              name: "date",
              type: "date",
              placeholder: "Preferred Date / Data Preferuar",
              required: true,
            },
          ]}
          textarea={{
            name: "message",
            placeholder: "Your Message / Mesazhi Juaj",
            rows: 5,
          }}
          useInvertedBackground={false}
          imageSrc="http://img.b2bpic.net/free-photo/table-set-dinning-table_1339-3461.jpg?_wi=4"
          imageAlt="restaurant table setting reservation dining"
          mediaAnimation="blur-reveal"
          mediaPosition="right"
          buttonText="Send Reservation / Dërgo Rezervim"
          onSubmit={handleSubmit}
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterMedia
          logoText="Mensa Gjyshi"
          copyrightText="© 2025 Mensa Gjyshi | Rruga Viktor Eftemiu 8, Tiranë"
          imageSrc="http://img.b2bpic.net/free-vector/flat-design-food-label-collection_23-2149111140.jpg?_wi=4"
          imageAlt="restaurant logo traditional Albanian design"
          columns={footerColumns}
        />
      </div>
    </ThemeProvider>
  );
}