"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),u=require("gsap"),g=require("react"),n=require("../../../../node_modules/.pnpm/gsap@3.13.0/node_modules/gsap/ScrollTrigger.cjs.js"),i=require("../../../../utils/cn/cn.cjs.js"),e=require("../../../../src/modules/OptimalHealth/components/ClockImages/clockImages.module.css");u.gsap.registerPlugin(n.ScrollTrigger);const o=[{key:"smallSquareImage1",className:e.smallSquareImage,to:{x:100,y:60}},{key:"rectImage2",className:e.rectImage,to:{x:70,y:70}},{key:"smallSquareImage3",className:e.smallSquareImage,to:{x:40,y:60}},{key:"largeSquareImage4",className:e.largeSquareImage,to:{x:-110,y:55}},{key:"rectImage5",className:e.rectImage,to:{x:-150,y:69}},{key:"smallSquareImage6",className:e.smallSquareImage,to:{x:-100,y:9}},{key:"rectImage7",className:e.rectImage,to:{x:-65,y:-100}},{key:"smallSquareImage8",className:e.smallSquareImage,to:{x:50,y:-100}},{key:"rectImage9",className:e.rectImage,to:{x:50,y:-50}},{key:"largeSquareImage10",className:e.largeSquareImage,to:{x:56,y:13}}],y=({images:t})=>{const r=g.useRef(null);return g.useEffect(()=>{r.current&&o.forEach(({key:a,to:s})=>{var c;const l=(c=r.current)==null?void 0:c.querySelector(`[data-ohealth-image-key="${a}"]`);l&&u.gsap.fromTo(l,{x:0,y:0},{x:s.x,y:s.y,duration:5,ease:"power2.out",scrollTrigger:{trigger:r.current,start:"top 80%",end:"+=500",once:!0,scrub:!1,toggleActions:"play none none reverse"}})})},[t]),m.jsx("div",{ref:r,className:e.root,children:o.map(({key:a,className:s})=>m.jsx("img",{src:t[a],className:i.cn(e.image,s,e[a]),"data-ohealth-image-key":a,alt:a},a))})};exports.ClockImages=y;
