"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),i=require("react"),h=require("../../components/Button/Button.cjs.js"),t=require("../../utils/cn/cn.cjs.js"),f=require("./assets/prod1.png.cjs.js"),v=require("./assets/prod2.png.cjs.js"),N=require("./assets/prod3.png.cjs.js"),j=require("./assets/pill1.jpg.cjs.js"),b=require("./assets/pill2.jpg.cjs.js"),T=require("./assets/pill3.jpg.cjs.js"),V=require("./assets/graph1.svg.cjs.js"),I=require("./assets/graph2.svg.cjs.js"),q=require("./assets/graph3.svg.cjs.js"),e=require("../../src/pageComponents/PersonalizedProtocolHero/personalizedProtocolHero.module.css"),m=require("../../types/analytics/analytics.cjs.js"),C=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),s=require("../../components/Typography/Typography.cjs.js"),c=[{pill:j.default,product:f.default,protocol:"ENERGY",dosage:{text:"Oxytocin Nasal Spray",value:"3MG"},goal:"REDUCE STRESS",svg:V.default},{pill:b.default,product:v.default,protocol:"METABOLISM",dosage:{text:"Metformin",value:"3MG"},goal:"AUTOPHAGY INDUCTION",svg:I.default},{pill:T.default,product:N.default,protocol:"SENESCENCE",dosage:{text:"Rapamycin",value:"3MG"},goal:"LONGEVITY",svg:q.default}],E=()=>{const[d,g]=i.useState(0),[x,y]=i.useState(0),[l,p]=i.useState(!1);i.useEffect(()=>{const o=setInterval(()=>{const r=(d+1)%c.length;g(r),setTimeout(()=>{p(!0),setTimeout(()=>{y(r),p(!1)},200)},200)},2500);return()=>clearInterval(o)},[d]);const n=c[x],u=()=>{var o;(o=window.eventBus)==null||o.emit("analytics",{event:m.EAnalyticsEvent.ctaClicked,type:m.EAnalyticsEventType.interaction,component:"PersonalizedProtocolHero",payload:{link:"https://app.gethealthspan.com/#/product/signup/6896e50bc0af7d4d26738948"}})};return a.jsx("section",{className:e.root,"data-type":"hero",children:a.jsxs("div",{className:e.container,children:[a.jsxs("div",{className:e.leftContent,children:[a.jsx("div",{className:e.title,children:a.jsx(C.HighlightedTitle,{as:"p",colorScheme:"dark",defaultVariant:"displayMd",mobileVariant:"displayXs",title:a.jsxs(a.Fragment,{children:["A longevity protocol that's ",a.jsx("b",{children:"all you"})]})})}),a.jsx(s.Typography,{className:e.description,as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",children:"There's nothing more personal than your health, which is why your Healthspan care team works closely with you — using lab testing, data, and coaching — to design and optimize a protocol to fit your unique goals."}),a.jsx("div",{className:t.cn(e.buttonWrap,e.mobile),children:a.jsx(h.Button,{as:"a",href:"https://app.gethealthspan.com/#/product/signup/6896e50bc0af7d4d26738948",variant:"secondary",size:"md",onClick:u,children:"Join Healthspan"})}),a.jsx("div",{className:t.cn(e.buttonWrap,e.desktop),children:a.jsx(h.Button,{as:"a",href:"https://app.gethealthspan.com/#/product/signup/6896e50bc0af7d4d26738948",variant:"secondary",size:"lg",onClick:u,children:"Join Healthspan"})})]}),a.jsx("div",{className:e.pillContainer,children:c.map((o,r)=>a.jsx("img",{src:o.pill,className:t.cn(e.pillImage,r===d&&e.active,r===(d-1+c.length)%c.length&&e.exiting),alt:"Pill"},r))}),a.jsxs("div",{className:e.textContainer,children:[a.jsxs("div",{className:e.protocolContainer,children:[a.jsx(s.Typography,{className:e.protocolText,as:"p",defaultVariant:"labelMd",mobileVariant:"labelXs",children:"Protocol"}),a.jsx("div",{className:t.cn(e.protocolFade,l?e.fadeOut:e.fadeIn),children:a.jsx(s.Typography,{className:e.protocolValue,as:"p",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,children:n.protocol})})]}),a.jsxs("div",{className:e.dosageContainer,children:[a.jsx("div",{className:t.cn(e.dosageImageFade,l?e.fadeOut:e.fadeIn),children:a.jsx("img",{src:n.product,className:e.dosageItem,alt:"Product"})}),a.jsxs("div",{className:e.dosageTextBlock,children:[a.jsx("div",{className:t.cn(e.dosageTextFade,l?e.fadeOut:e.fadeIn),children:a.jsx(s.Typography,{className:e.dosageText,as:"p",defaultVariant:"labelMd",mobileVariant:"labelXs",children:n.dosage.text})}),a.jsx("div",{className:t.cn(e.dosageValueFade,l?e.fadeOut:e.fadeIn),children:a.jsx(s.Typography,{className:e.dosageValue,as:"p",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,children:n.dosage.value})})]})]}),a.jsxs("div",{className:e.goalContainer,children:[a.jsx(s.Typography,{className:e.goalText,as:"p",defaultVariant:"labelMd",mobileVariant:"labelXs",children:"Goal"}),a.jsx("div",{className:t.cn(e.goalFade,l?e.fadeOut:e.fadeIn),children:a.jsx(s.Typography,{className:e.goalValue,as:"p",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,children:n.goal})})]}),a.jsx("div",{className:e.svgContainer,children:a.jsx("div",{className:t.cn(e.svgFade,l?e.fadeOut:e.fadeIn),children:i.createElement(n.svg,{className:e.svg})})})]})]})})};exports.PersonalizedProtocolHero=E;
