// Rich catalog product card for the e-shop kit (kit-level so it compiles fresh // into the standalone). Composes DS Photo/Rating/Badge/Tag/Button + kit Bits. (function () { if (typeof React === "undefined") return; const DS = window.VElaStvNajmanDesignSystem_bc3fc2; const { Photo, Rating, Badge, Tag } = DS; const Icon = window.VNIcon; function ProductCardPro({ product, onOpen, onAdd, onQuickView, onNotify, onPreorder }) { const p = product; const soldOut = p.stock === "out"; const restock = p.restock || null; const [added, setAdded] = React.useState(false); const addedTimer = React.useRef(null); const handleAdd = (e) => { e.stopPropagation(); onAdd && onAdd(p); setAdded(true); clearTimeout(addedTimer.current); addedTimer.current = setTimeout(() => setAdded(false), 1500); }; React.useEffect(() => () => clearTimeout(addedTimer.current), []); return (
onOpen && onOpen(p)}> {/* hover second layer — warm "in use" treatment over the same shot */}
{p.badge && ( {p.badge.label} )}
{p.stock === "out" ? "Vyprodáno" : p.stock === "low" ? "Poslední kusy" : "Skladem"}
{p.region && {p.region}}

onOpen && onOpen(p)}>{p.name}

{window.VNTasteProfile && p.profile && (p.profile.color > 0 || p.profile.sweet > 0) && ( )}
{p.price > 0 ? ( <>{p.variants && p.variants.length ? "od " + Math.min.apply(null, p.variants.map(v => v.price)) : p.price} Kč· vč. DPH ) : ( Cena na dotaz )} {soldOut ? ( restock ? ( ) : ( ) ) : ( )}
); } window.VNProductCard = ProductCardPro; })();