{"version":3,"file":"PlayNavigationClick.32o7AXI7.mjs","names":["useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/nR1Wkjao68yTfjPHTGYT/LFHmOVn7WXO5dpMb6Kql/PlayNavigationClick.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useRef}from\"react\";// User request: Create a Framer code override export named PlayNavigationClick that plays the provided Cloudinary MP3 once on click/tap, with lazy HTMLAudioElement initialization, rewind-before-replay behavior, ~0.4 volume, ~80ms cooldown, SSR safety, and preserved wrapped interactions/links/styling/children.\nconst NAV_CLICK_AUDIO_URL=\"https://res.cloudinary.com/v60xwitu/video/upload/v1786782318/chwip_bsnxxb.mp3\";const COOLDOWN_MS=80;let sharedAudio=null;function getAudio(){if(typeof window===\"undefined\")return null;if(!sharedAudio){const audio=new Audio(NAV_CLICK_AUDIO_URL);audio.preload=\"auto\";audio.volume=.4;sharedAudio=audio;}return sharedAudio;}export function PlayNavigationClick(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const lastPlayRef=useRef(0);const playSound=useCallback(()=>{if(typeof window===\"undefined\")return;const now=window.performance?.now?.()??Date.now();if(now-lastPlayRef.current<COOLDOWN_MS)return;lastPlayRef.current=now;const audio=getAudio();if(!audio)return;audio.volume=.4;audio.currentTime=0;void audio.play().catch(()=>{});},[]);const handleTap=useCallback((...args)=>{playSound();props.onTap?.(...args);},[playSound,props]);const handleClick=useCallback((...args)=>{playSound();props.onClick?.(...args);},[playSound,props]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onTap:handleTap,onClick:handleClick});});}\nexport const __FramerMetadata__ = {\"exports\":{\"PlayNavigationClick\":{\"type\":\"reactHoc\",\"name\":\"PlayNavigationClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PlayNavigationClick.map"],"mappings":"yIACoJ,SAAS,GAAU,CAAC,GAAU,IAAS,OAAY,OAAO,KAAK,GAAG,CAAC,EAAY,CAAC,IAAM,EAAM,IAAI,MAAM,CAAmB,EAAE,EAAM,QAAQ,OAAO,EAAM,OAAO,GAAG,EAAY,CAAM,CAAC,OAAO,CAAY,CAAC,SAAgB,EAAoB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAYA,EAAO,CAAC,EAAQ,EAAUC,MAAgB,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAI,EAAO,aAAa,MAAM,GAAG,KAAK,IAAI,EAAE,GAAG,EAAI,EAAY,QAAQ,EAAY,OAAO,EAAY,QAAQ,EAAI,IAAM,EAAM,EAAS,EAAM,IAAa,EAAM,OAAO,GAAG,EAAM,YAAY,EAAE,EAAW,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAQ,EAAUA,GAAa,GAAG,IAAO,CAAC,EAAU,EAAE,EAAM,QAAQ,GAAG,CAAI,CAAE,EAAE,CAAC,EAAU,CAAK,CAAC,EAAQ,EAAYA,GAAa,GAAG,IAAO,CAAC,EAAU,EAAE,EAAM,UAAU,GAAG,CAAI,CAAE,EAAE,CAAC,EAAU,CAAK,CAAC,EAAE,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,MAAM,EAAU,QAAQ,CAAW,CAAC,CAAE,CAAC,CAAE,2BAD5/B,IAAiD,EACrF,EAAoB,gFAAsF,EAAY,GAAO,EAAY"}