"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import ReactLenis from "lenis/react";
import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline';
import ProductCardTwo from '@/components/sections/product/ProductCardTwo';
import FeatureCardThree from '@/components/sections/feature/featureCardThree/FeatureCardThree';
import FooterLogoEmphasis from '@/components/sections/footer/FooterLogoEmphasis';
import { useState } from 'react';
import { Instagram, Facebook } from "lucide-react";

export default function FleetPage() {
  const [popupContent, setPopupContent] = useState<{title: string, body: string} | null>(null);

  return (
    <ThemeProvider
        defaultButtonVariant="expand-hover"
        defaultTextAnimation="background-highlight"
        borderRadius="rounded"
        contentWidth="medium"
        sizing="largeSmallSizeLargeTitles"
        background="blurBottom"
        cardStyle="soft-shadow"
        primaryButtonStyle="radial-glow"
        secondaryButtonStyle="solid"
        headingFontWeight="bold"
    >
      <ReactLenis root>
        <div id="nav" data-section="nav">
            <NavbarLayoutFloatingInline
            navItems={[
                { name: "Home", id: "/" },
                { name: "Our Premium Fleet", id: "/fleet" },
                { name: "Contact us", id: "/contact-us" },
            ]}
            brandName="CleanScene"
            logoSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Cr9i1HT3S4vLNiV9XJ6S4fk81W/uploaded-1777837799704-b8guhfm1.png"
            logoAlt="CleanScene Logo"
            button={{ text: "Get My Free Estimate", href: "/estimate" }}
            className="py-2"
            />
        </div>

        <div id="fleet-preview" data-section="fleet-preview">
            <ProductCardTwo
            animationType="slide-up"
            textboxLayout="split-description"
            gridVariant="four-items-2x2-equal-grid"
            useInvertedBackground={false}
            products={[
                { 
                    id: "p1", 
                    brand: "CleanScene", 
                    name: "3 Station, Private Floorplan Restroom Trailer", 
                    price: "$1,375 per day", 
                    rating: 5, 
                    reviewCount: "12", 
                    imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Cr9i1HT3S4vLNiV9XJ6S4fk81W/uploaded-1777832277795-ebq2l26f.png?_wi=1", 
                    onProductClick: () => setPopupContent({ title: "3-Station Private Restroom Trailer", body: "Modern Finishings" })
                },
                { 
                    id: "p2", 
                    brand: "CleanScene", 
                    name: "4 Station, Community Floorplan Restroom Trailer", 
                    price: "$1,825 per day", 
                    rating: 5, 
                    reviewCount: "15", 
                    imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Cr9i1HT3S4vLNiV9XJ6S4fk81W/uploaded-1777832470445-mr4qosuh.png?_wi=1", 
                    onProductClick: () => setPopupContent({ title: "4-Station Community Restroom Trailer", body: "Rustic Elegance" })
                },
            ]}
            title="Our premium fleet"
            textBoxTitleClassName="text-[#0a7039]"
            description="Premium, climate-controlled mobile restrooms for every event size."
            />
        </div>

        <div id="features" data-section="features">
            <FeatureCardThree
                title="Premium interiors for a premium fleet"
                description="Our restroom trailers are designed for comfort and ease."
                textboxLayout="default"
                gridVariant="three-columns-all-equal-width"
                animationType="slide-up"
                features={[
                    { title: "Private restrooms with rustic finishings", description: "4-Station, Community Floorplan", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Cr9i1HT3S4vLNiV9XJ6S4fk81W/uploaded-1777844457157-thyrfsbj.png" },
                    { title: "Private restrooms with modern finishings", description: "3-Station, Private Floorplan", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Cr9i1HT3S4vLNiV9XJ6S4fk81W/uploaded-1777844630022-ryezs5em.jpg?_wi=1" },
                    { title: "Lighted vanity with rustic finishings", description: "4-Station, Community Floorplan", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Cr9i1HT3S4vLNiV9XJ6S4fk81W/uploaded-1777844630022-blt2zl10.jpg" }
                ]}
                useInvertedBackground={false}
            />
        </div>

        <div id="footer" data-section="footer">
            <div className="flex flex-col items-center py-8">
              <div className="flex items-center mb-4 gap-4">
                <a href="https://www.instagram.com/cleanscene" target="_blank" rel="noopener noreferrer" aria-label="Follow CleanScene on Instagram" className="text-[#0a7039] hover:opacity-80 transition-opacity">
                  <Instagram size={24} />
                </a>
                <a href="https://www.facebook.com/people/CleanScene-Restroom-Rentals/61588358724791/?sk=about" target="_blank" rel="noopener noreferrer" aria-label="CleanScene Restroom Rentals on Facebook" className="text-[#0a7039] hover:opacity-80 transition-opacity">
                  <Facebook size={24} />
                </a>
              </div>
              <FooterLogoEmphasis
                columns={[
                  { items: [{ label: "Home", href: "/" }, { label: "Our Premium Fleet", href: "/fleet" }, { label: "Get My Free Estimate", href: "/estimate" }] },
                  { items: [{ label: "Contact Us", href: "/contact-us" }, { label: "Privacy Policy", href: "/privacy" }, { label: "Terms and Conditions", href: "/terms" }] },
                ]}
                logoText=""
              />
            </div>
        </div>
      </ReactLenis>
    </ThemeProvider>
  );
}