{"version":3,"file":"Random_Count.C2-C37zL.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/ss6gKSJc8PZHm0jynO9o/lvjRouZGTM2TWPlnPocP/Random_Count.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,startTransition,useRef}from\"react\";import{useInView}from\"framer-motion\";export const withFakeViewCount400=Component=>{return props=>{const[viewCount,setViewCount]=useState(400)// Initial view count\n;const ref=useRef();const inView=useInView(ref);useEffect(()=>{if(!inView)return;const updateViewCount=()=>{startTransition(()=>setViewCount(prev=>{const change=Math.floor(Math.random()*3)-1// Randomly -1, 0, or +1\n    ;const newCount=prev+change;return Math.min(Math.max(newCount,413),420)// Clamp to range 400–415\n    ;}));};const interval=setInterval(updateViewCount,Math.random()*500+1e3)// Update every 3-6 seconds\n;return()=>clearInterval(interval)// Cleanup on unmount\n;},[inView]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref,text:viewCount.toString()});};};export const withFakeViewCount5000=Component=>{return props=>{const[viewCount,setViewCount]=useState(5143)// Initial view count\n;const ref=useRef();const inView=useInView(ref);useEffect(()=>{if(!inView)return;const updateViewCount=()=>{startTransition(()=>setViewCount(prev=>{const change=Math.floor(Math.random()*3)-1// Randomly -1, 0, or +1\n    ;const newCount=prev+change;return Math.min(Math.max(newCount,5e3),5200)// Clamp to range 400–415\n    ;}));};const interval=setInterval(updateViewCount,Math.random()*100+500)// Update every 3-6 seconds\n;return()=>clearInterval(interval)// Cleanup on unmount\n;},[inView]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref,text:viewCount.toString()});};};\nexport const __FramerMetadata__ = {\"exports\":{\"withFakeViewCount400\":{\"type\":\"reactHoc\",\"name\":\"withFakeViewCount400\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFakeViewCount5000\":{\"type\":\"reactHoc\",\"name\":\"withFakeViewCount5000\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\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