import { ShoppingBag } from "lucide-react"; import { Price, type PriceType, PriceValue, } from "@/components/shadcnblocks/price"; import { AspectRatio } from "@/components/ui/aspect-ratio"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { cn } from "@/lib/utils"; type MediaType = { src: string; alt: string; }; type Product = { image: string; name: string; href: string; price: PriceType; }; type HeroData = { title?: string; cta?: { label: string; href: string; }; product?: Product; image?: MediaType; video?: MediaType; }[]; type ProductCardProps = Product; interface EcommerceHero2Props { className?: string; heroData: HeroData; } const HERO_DATA: HeroData = [ { image: { src: "/block-media/shadcnblocks/block/ecommerce/clothes/bicolor-crewneck-sweatshirt-with-embroidered-logo.png", alt: "عکس لایفاستایل هودی راحت", }, title: "راحتی روزمره، استایل مدرن", cta: { label: "خرید هودی", href: "#", }, }, { video: { src: "/block-media/shadcnblocks/block/3888261-hd_720_1366_50fps.mp4", alt: "مدل در حال حرکت با پالتو مدرن", }, product: { image: "/block-media/shadcnblocks/block/ecommerce/clothes/black-hoodie-against-light-background.png", price: { regular: 780, sale: 420, currency: "IRR", }, name: "پالتو مدرن دوختدار", href: "#", }, }, ]; const EcommerceHero2 = ({ className, heroData = HERO_DATA, }: EcommerceHero2Props) => { return ( {heroData.map(({ image, video, title, cta, product }, index) => ( {image && ( )} {video && ( )} {title && ( {title} )} {cta && ( {cta.label} )} {product && } ))} ); }; const ProductCard = ({ image, name, price, href }: ProductCardProps) => { const { regular, sale, currency } = price; return ( {name} ); }; export { EcommerceHero2 };