import { ShoppingBag } from "lucide-react"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; type ImageMedia = { type: "image"; alt: string; src: string; srcSet?: string; sizes?: string; }; type VideoMedia = { type: "video"; src: string; }; type MediaItem = ImageMedia | VideoMedia; interface ProductCategory { title: string; text: string; link: string; cta?: { link: string; text: string; }; media: MediaItem; } interface ProductCategories5Props { categories: ProductCategory[]; className?: string; } const PRODUCT_CATEGORIES: ProductCategory[] = [ { title: "استایل بی‌زحمت", text: "تا ۵۰٪ تخفیف", link: "#", media: { type: "video", src: "/block-media/shadcnblocks/block/6764045-hd_720_1280_25fps.mp4", }, }, { title: "ملزومات روزمره", text: "تا ۵۰٪ تخفیف", cta: { link: "#", text: "بیشتر ببینید", }, link: "#", media: { type: "image", srcSet: "/block-media/shadcnblocks/block/ecommerce/clothes/Woman-in-Embroidered-Blue-Top-2.png 1920w, /images/block/ecommerce/clothes/pexels-cottonbro-6764036-2.jpg 1280w, /images/block/ecommerce/clothes/pexels-cottonbro-6764036-1.jpg 640w", src: "/block-media/shadcnblocks/block/ecommerce/clothes/Woman-in-Embroidered-Blue-Top-2.png", sizes: "(min-width: 1920px) 1920px, (min-width: 1280px) 1280px, 100vw", alt: "ملزومات روزمره", }, }, ]; const ProductCategories5 = ({ categories = PRODUCT_CATEGORIES, className, }: ProductCategories5Props) => { const category1 = categories[0]; const category2 = categories[1]; return (

{category1.title}

{category1.text}

{category2.title}

{category2.text}

{category2.cta && ( )}
{category2.media.type === "image" && ( )}
); }; export { ProductCategories5 };