"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("react"),R=require("../../utils/useIsMobile.cjs.js"),g=require("./assets/hero1.jpg.cjs.js"),x=require("./assets/hero2.jpg.cjs.js"),m=require("./assets/hero3.jpg.cjs.js"),w=require("./assets/hero4.jpg.cjs.js"),p=require("./assets/hero5.jpg.cjs.js"),I=require("./assets/hero6.jpg.cjs.js"),z=require("./assets/hero7.jpg.cjs.js"),q=require("./assets/hero8.jpg.cjs.js"),b=require("./assets/hero9.jpg.cjs.js"),l=require("../../src/pageComponents/OurCompanyHero/ourCompanyHero.module.css"),M=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),y={desktop:[{left:-120,width:360,height:480,zIndex:1,src:w.default},{left:180,width:360,height:240,zIndex:3,src:g.default},{left:450,width:270,height:360,zIndex:1,src:p.default},{left:690,width:120,height:160,zIndex:2,src:z.default},{left:780,width:360,height:480,zIndex:1,src:x.default},{left:1021,width:360,height:288,zIndex:2,src:I.default},{left:1321,width:270,height:360,zIndex:2,src:m.default},{left:1501,width:270,height:216,zIndex:3,src:b.default},{left:1724,width:203,height:270,zIndex:3,src:q.default}],mobile:[{left:-120,width:180,height:240,zIndex:1,src:w.default},{left:30,width:180,height:120,zIndex:3,src:g.default},{left:165,width:135,height:180,zIndex:1,src:x.default},{left:285,width:60,height:80,zIndex:2,src:I.default},{left:330,width:180,height:240,zIndex:1,src:m.default},{left:450,width:180,height:144,zIndex:2,src:b.default},{left:600,width:140,height:180,zIndex:3,src:p.default},{left:720,width:180,height:120,zIndex:3,src:q.default},{left:880,width:140,height:180,zIndex:3,src:z.default}]};function S(o){const e=o[0].left,t=o[o.length-1];return t.left+t.width-e}const H=()=>{const e=R.useIsMobile()?y.mobile:y.desktop,t=i.useMemo(()=>S(e),[e]),a=i.useRef(null),s=i.useRef(0),f=i.useRef(typeof window!="undefined"?window.scrollY:0),h=i.useRef(null),j=.5;return i.useEffect(()=>{let r=!0;const c=()=>{if(!r)return;const d=window.scrollY,u=d-f.current;f.current=d,s.current+=u*j,s.current<0&&(s.current+=t),s.current>=t&&(s.current-=t),a.current&&(a.current.style.transform=`translateX(-${s.current}px)`),h.current=requestAnimationFrame(c)};return h.current=requestAnimationFrame(c),()=>{r=!1,h.current&&cancelAnimationFrame(h.current)}},[t]),n.jsxs("section",{className:l.bgWrapper,"data-type":"hero",children:[n.jsx("div",{className:l.topContainer,children:n.jsx(M.HighlightedTitle,{colorScheme:"dark",title:n.jsxs("p",{children:["Going beyond lifespan. ",n.jsx("b",{children:"We’re Healthspan."})]}),defaultVariant:"displayLg",mobileVariant:"displayXs",className:l.title})}),n.jsx("div",{className:l.heroScrollOuter,children:n.jsx("div",{className:l.heroScrollInner,ref:a,style:{transform:"translateX(0px)"},children:[...e,...e,...e].map((r,c)=>{const d=Math.floor(c/e.length),u=r.left+d*t;return n.jsx("img",{src:r.src,className:l.heroCard,alt:"Our company hero",draggable:!1,style:{left:`${u}px`,width:`${r.width}px`,height:`${r.height}px`,zIndex:r.zIndex}},c)})})})]})};exports.OurCompanyHero=H;
