import { notFound } from "next/navigation" import Image from "next/image" import { getProductById } from "@/lib/products" import { Card, CardContent } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { Star, Truck, Shield, RotateCcw } from "lucide-react" import AddToCartButton from "@/components/store/add-to-cart-button" interface ProductPageProps { params: { id: string } } export default function ProductPage({ params }: ProductPageProps) { const product = getProductById(params.id) if (!product) { notFound() } return (
{/* Product Images */}
{product.isOnSale && ( خصم {product.discount}% )} {product.name}
{product.images && product.images.length > 0 && (
{product.images.map((image, index) => ( {`${product.name} ))}
)}
{/* Product Info */}

{product.name}

{product.description}

{/* Rating */}
{[...Array(5)].map((_, i) => ( ))}
{product.rating}
({product.reviewCount} تقييم)
{/* Price */}
{product.price} جنيه {product.originalPrice && ( {product.originalPrice} جنيه )}
{/* Stock Status */}
{product.inStock ? `متوفر في المخزن (${product.stockQuantity} قطعة)` : "غير متوفر"}
{/* Brand */}
الماركة: {product.brand}
{/* Add to Cart */} {/* Features */}

المزايا الرئيسية

    {product.features.map((feature, index) => (
  • {feature}
  • ))}
{/* Service Icons */}

شحن مجاني

ضمان الجودة

إرجاع مجاني

{/* Specifications */}

المواصفات التقنية

{Object.entries(product.specifications).map(([key, value]) => (
{key} {value}
))}
) }