"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),d=require("./cards/Protocol.cjs.js"),u=require("./cards/Age.cjs.js"),m=require("./cards/Biomarker.cjs.js"),C=require("./cards/Facetime.cjs.js"),e=require("../../../../src/pageComponents/HomepageHero/components/MiddleCarousel/middleCarousel.module.css"),f=[r.jsx(d.ProtocolCard,{},"protocol"),r.jsx(u.AgeCard,{},"age"),r.jsx(m.BiomarkerCard,{},"biomarker"),r.jsx(C.FacetimeCard,{},"facetime")];function x(){const[i,l]=c.useState(0),t=4;return c.useEffect(()=>{const a=setInterval(()=>{l(o=>(o+1)%t)},2500);return()=>clearInterval(a)},[t]),r.jsx("div",{className:e.carousel,children:f.map((a,o)=>{let s=(o-i+t)%t;s===t-1&&(s=-1);let n;return s===-1?n=e.left:s===0?n=e.center:s===1?n=e.right:n=e.hidden,r.jsx("div",{className:`${e.card} ${n}`,children:r.jsx("div",{className:e.cardContent,children:a})},o)})})}exports.MiddleCarousel=x;
