"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
import FooterMedia from '@/components/sections/footer/FooterMedia';
import ProductCardThree from '@/components/sections/product/ProductCardThree';
import { ShoppingCart } from 'lucide-react';

export default function ShopPage() {
  // Sample product data for iPhone store
  const products = [
    {
      id: "1",      name: "iPhone 15 Pro",      price: "$999.00",      imageSrc: "https://images.unsplash.com/photo-1592899677977-9c10ca588bbd?w=400&h=400&fit=crop&crop=center",      imageAlt: "iPhone 15 Pro",      initialQuantity: 1,
      onProductClick: () => window.open('https://apple.com', '_blank'),
      onQuantityChange: (qty: number) => console.log(`Quantity changed to: ${qty}`),
      isFavorited: false
    },
    {
      id: "2",      name: "iPhone 15",      price: "$799.00",      imageSrc: "https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?w=400&h=400&fit=crop&crop=center",      imageAlt: "iPhone 15",      initialQuantity: 1,
      onProductClick: () => window.open('https://apple.com', '_blank'),
      onQuantityChange: (qty: number) => console.log(`Quantity changed to: ${qty}`),
      isFavorited: false
    },
    {
      id: "3",      name: "iPhone 14 Pro Max",      price: "$1099.00",      imageSrc: "https://images.unsplash.com/photo-1556656793-08538906a9f8?w=400&h=400&fit=crop&crop=center",      imageAlt: "iPhone 14 Pro Max",      initialQuantity: 1,
      onProductClick: () => window.open('https://apple.com', '_blank'),
      onQuantityChange: (qty: number) => console.log(`Quantity changed to: ${qty}`),
      isFavorited: false
    },
    {
      id: "4",      name: "iPhone SE",      price: "$429.00",      imageSrc: "https://images.unsplash.com/photo-1574944985070-8f3ebc6b79d2?w=400&h=400&fit=crop&crop=center",      imageAlt: "iPhone SE",      initialQuantity: 1,
      onProductClick: () => window.open('https://apple.com', '_blank'),
      onQuantityChange: (qty: number) => console.log(`Quantity changed to: ${qty}`),
      isFavorited: false
    },
    {
      id: "5",      name: "iPhone 13 Mini",      price: "$529.00",      imageSrc: "https://images.unsplash.com/photo-1605236453806-b25e5d5cce04?w=400&h=400&fit=crop&crop=center",      imageAlt: "iPhone 13 Mini",      initialQuantity: 1,
      onProductClick: () => window.open('https://apple.com', '_blank'),
      onQuantityChange: (qty: number) => console.log(`Quantity changed to: ${qty}`),
      isFavorited: false
    },
    {
      id: "6",      name: "iPhone 12",      price: "$599.00",      imageSrc: "https://images.unsplash.com/photo-1601784551446-20c9e07cdbdb?w=400&h=400&fit=crop&crop=center",      imageAlt: "iPhone 12",      initialQuantity: 1,
      onProductClick: () => window.open('https://apple.com', '_blank'),
      onQuantityChange: (qty: number) => console.log(`Quantity changed to: ${qty}`),
      isFavorited: false
    }
  ];

  return (
    <ThemeProvider
      defaultButtonVariant="hover-bubble"
      defaultTextAnimation="background-highlight"
      borderRadius="soft"
      contentWidth="compact"
      sizing="largeSizeMediumTitles"
      background="circleGradient"
      cardStyle="outline"
      primaryButtonStyle="shadow"
      secondaryButtonStyle="radial-glow"
      headingFontWeight="medium"
    >
      <NavbarStyleApple
        brandName="iPhone"
        navItems={[
          { name: "Home", id: "/" },
          { name: "Shop", id: "/shop" }
        ]}
      />
      
      <main className="min-h-screen">
        <ProductCardThree
          products={products}
          title="iPhone Collection"
          description="Choose your perfect iPhone and add it to your cart with the desired quantity"
          tag="Available Now"
          tagIcon={ShoppingCart}
          textboxLayout="default"
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          useInvertedBackground="noInvert"
          buttons={[
            {
              text: "View All Models",              href: "#products"
            },
            {
              text: "Compare iPhones",              href: "#features"
            }
          ]}
        />
      </main>

      <FooterMedia
        imageSrc="asset://footer-image"
        imageAlt="iPhone product lineup"
        logoText="iPhone"
        copyrightText="© 2025 Apple Inc. All rights reserved."
        columns={[
          {
            title: "Shop",            items: [
              { label: "iPhone Models", href: "#products" },
              { label: "Compare", href: "#features" },
              { label: "Specs", href: "#metrics" },
              { label: "Trade In", href: "#" }
            ]
          },
          {
            title: "Support",            items: [
              { label: "Help & Support", href: "#faq" },
              { label: "AppleCare+", href: "#" },
              { label: "Contact Us", href: "#contact" },
              { label: "Service Status", href: "#" }
            ]
          },
          {
            title: "Company",            items: [
              { label: "About", href: "#" },
              { label: "Privacy Policy", href: "#" },
              { label: "Terms of Service", href: "#" },
              { label: "Careers", href: "#" }
            ]
          }
        ]}
      />
    </ThemeProvider>
  );
}