"use client";

import React from 'react';
import { ThemeProvider } from '@/providers/themeProvider/ThemeProvider';
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
import ProductCardTwo from '@/components/sections/product/ProductCardTwo';
import FooterBase from '@/components/sections/footer/FooterBase';
import { ShoppingBag } from 'lucide-react';

// Mock product data - replace with actual data fetching
const mockProducts = [
  {
    id: '1',
    brand: 'Baklajan',
    name: 'Elegant Rose Bouquet',
    price: '$85',
    rating: 5,
    reviewCount: '150+',
    imageSrc: 'https://img.b2bpic.net/free-photo/stunning-wedding-bouquet-made-red-flowers-greenery-lies-o_8353-722.jpg',
    imageAlt: 'Beautiful red rose bouquet'
  },
  {
    id: '2',
    brand: 'Baklajan',
    name: 'Sunflower Arrangement',
    price: '$65',
    rating: 5,
    reviewCount: '120+',
    imageSrc: 'https://img.b2bpic.net/free-photo/flower-bouquet-pink-candles-rustic-wooden-space_114579-2569.jpg',
    imageAlt: 'Bright sunflower arrangement'
  },
  {
    id: '3',
    brand: 'Baklajan',
    name: 'Mixed Spring Flowers',
    price: '$95',
    rating: 5,
    reviewCount: '95+',
    imageSrc: 'https://img.b2bpic.net/free-photo/beautiful-bouquet-pastel-color-flowers-cage-container_114579-1883.jpg',
    imageAlt: 'Colorful spring flower mix'
  },
  {
    id: '4',
    brand: 'Baklajan',
    name: 'White Lily Bouquet',
    price: '$75',
    rating: 5,
    reviewCount: '80+',
    imageSrc: 'https://img.b2bpic.net/free-photo/cozy-pretty-bouquet-blue-purple-combination-flowers_114579-1547.jpg',
    imageAlt: 'Pure white lily bouquet'
  },
  {
    id: '5',
    brand: 'Baklajan',
    name: 'Tropical Paradise',
    price: '$120',
    rating: 5,
    reviewCount: '65+',
    imageSrc: 'https://img.b2bpic.net/free-photo/assorted-flower-arrangement-vase_209848-94.jpg',
    imageAlt: 'Exotic tropical flower arrangement'
  },
  {
    id: '6',
    brand: 'Baklajan',
    name: 'Classic Tulip Bundle',
    price: '$55',
    rating: 4,
    reviewCount: '45+',
    imageSrc: 'https://img.b2bpic.net/free-photo/vertical-shot-bouquet-made-pink-white-beautiful-flowers_181624-15886.jpg',
    imageAlt: 'Fresh tulip bundle'
  }
];

export default function ShopPage() {
  const handleProductClick = (product: any) => {
    // Handle product click - could navigate to product detail page
    console.log('Product clicked:', product);
  };

  const handleFavorite = (productId: string) => {
    // Handle favorite toggle
    console.log('Favorited product:', productId);
  };

  const handleViewAll = () => {
    // Handle view all products
    console.log('View all products clicked');
  };

  return (
    <ThemeProvider
      defaultButtonVariant="shift-hover"
      defaultTextAnimation="reveal-blur"
      borderRadius="pill"
      contentWidth="mediumSmall"
      sizing="largeSizeMediumTitles"
      background="circleGradient"
      cardStyle="gradient-bordered"
      primaryButtonStyle="flat"
      secondaryButtonStyle="layered"
      headingFontWeight="extrabold"
    >
      <NavbarStyleApple
        brandName="Baklajan"
        navItems={[
          { name: "Home", id: "/" },
          { name: "About", id: "about" },
          { name: "Services", id: "services" },
          { name: "Gallery", id: "gallery" },
          { name: "Testimonials", id: "testimonials" },
          { name: "Contact", id: "contact" },
          { name: "Shop", id: "/shop" }
        ]}
      />
      
      <main className="min-h-screen">
        <ProductCardTwo
          products={mockProducts.map(product => ({
            ...product,
            onProductClick: () => handleProductClick(product),
            onFavorite: () => handleFavorite(product.id),
            isFavorited: false
          }))}
          title="Our Flower Collection"
          description="Discover our carefully curated selection of premium flowers and arrangements for every occasion"
          tag="Shop Now"
          tagIcon={ShoppingBag}
          buttons={[
            {
              text: "View All Products",              onClick: handleViewAll
            }
          ]}
          textboxLayout="default"
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          useInvertedBackground="noInvert"
          ariaLabel="Shop products section"
        />
      </main>

      <FooterBase
        logoText="Baklajan"
        copyrightText="© 2025 Baklajan Flowers Studio. All rights reserved."
        columns={[
          {
            title: "Services",            items: [
              { label: "Weddings", href: "services" },
              { label: "Events", href: "services" },
              { label: "Subscriptions", href: "services" },
              { label: "Custom Orders", href: "contact" }
            ]
          },
          {
            title: "Company",            items: [
              { label: "About Us", href: "about" },
              { label: "Gallery", href: "gallery" },
              { label: "Testimonials", href: "testimonials" },
              { label: "Contact", href: "contact" }
            ]
          },
          {
            title: "Support",            items: [
              { label: "FAQ", href: "faq" },
              { label: "Delivery Info", href: "#" },
              { label: "Care Guide", href: "#" },
              { label: "Privacy Policy", href: "#" }
            ]
          }
        ]}
      />
    </ThemeProvider>
  );
}