import { Card } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; import { Star, Package, Tag, Palette } from "lucide-react"; interface ProductProperty { name: string; value: string; } interface ProductInfoCardProps { name: string; brandName?: string; stock?: number; barcode?: string; colour?: string; properties?: ProductProperty[]; description?: string; averageRating: number; reviewsCount: number; t: (key: string, params?: any) => string; } export function ProductInfoCard({ name, brandName, stock, barcode, colour, properties, description, averageRating, reviewsCount, t, }: ProductInfoCardProps) { return (
{/* Main Info Card */}

{name}

{/* Rating Section */} {reviewsCount > 0 && (
{Array.from({ length: 5 }).map((_, idx) => ( ))}
{averageRating.toFixed(1)} ({reviewsCount} {t("reviews")})
)}
{/* Specifications */}
{brandName && ( <>
{t("brands")}
{brandName}
)} {colour && ( <>
{t("color")}
{colour}
)} {properties && properties.length > 0 && ( <> {properties.map( (prop, idx) => prop.value && (
{prop.name}
{prop.value}
{idx < properties.length - 1 && ( )}
), )} )}
{/* Description Card */} {description && (

{t("product_description")}

)}
); }