"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),p=require("../../utils/cn/cn.cjs.js"),l=require("../../src/components/ProductGalleryCard/productGalleryCard.module.css"),n=require("../../types/analytics/analytics.cjs.js"),u=require("../Typography/Typography.cjs.js"),y=require("../Button/Button.cjs.js"),b=({name:r,price:m,image:h,zenpatientId:c,link:o,buttons:s,isHoverable:i=!0})=>{const v=()=>{var t;const e={event:n.EAnalyticsEvent.productGalleryCardClicked,type:n.EAnalyticsEventType.interaction,component:"ProductGalleryCard",element:"card",payload:{zenpatientId:c,link:o,productName:r}};(t=window.eventBus)==null||t.emit("analytics",e),window.location.pathname=o},d=(e,t)=>({event:n.EAnalyticsEvent.ctaClicked,type:n.EAnalyticsEventType.interaction,component:"ProductGalleryCard",element:`button_${t}`,payload:{ctaLabel:e.label,productId:c,productName:r}});return a.jsxs("div",{rel:"noopener noreferrer",className:l.root,onClick:v,children:[a.jsxs("div",{className:l.productInfo,children:[a.jsx(u.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:l.title,children:r}),a.jsx(u.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:l.price,children:m})]}),a.jsx("img",{src:h,alt:"product image",className:l.productImage}),a.jsx("div",{className:p.cn(l.buttonContainerDesktop,i&&l.hoverableButtons),children:s.map((e,t)=>a.jsx(y.Button,{size:"sm",...e,analyticsProps:d(e,t),children:e.label},t))}),a.jsx("div",{className:p.cn(l.buttonContainerMobile,i&&l.hoverableButtons),children:s.map((e,t)=>a.jsx(y.Button,{size:"xs",...e,analyticsProps:d(e,t),children:e.label},t))})]})};exports.ProductGalleryCard=b;
