{"version":3,"file":"shared.C8RN95VT.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/MgPEZanMsCQFhc1d2nYE/gJ74NaK622ZkVBPlXktF/AnimatedBackground.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useMemo}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useScroll,useTransform,useMotionValueEvent}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function AnimatedBackground(props){const{colorStops=[{position:0,color:\"#0000FF\"},{position:1200,color:\"#FF0000\"}],animationSpeed=.5}=props;const isStatic=useIsStaticRenderer();// Sorteer stops op positie voor correcte interpolatie\nconst sortedStops=useMemo(()=>{return[...colorStops].sort((a,b)=>a.position-b.position);},[colorStops]);// Preview modus in de Framer Canvas\nif(isStatic){return /*#__PURE__*/_jsx(\"div\",{style:previewContainerStyle,children:sortedStops.map((stop,i)=>/*#__PURE__*/_jsx(\"div\",{style:{...previewBarStyle,backgroundColor:stop.color}},i))});}return /*#__PURE__*/_jsx(LiveBackground,{colorStops:sortedStops,animationSpeed:animationSpeed});}// --- Live Logica ---\nfunction LiveBackground({colorStops,animationSpeed}){const{scrollY}=useScroll();// Bereid arrays voor Framer Motion voor\nconst positions=colorStops.map(s=>s.position);const colors=colorStops.map(s=>s.color);// Maak de kleur-transformator aan\n// Let op: Framer Motion handelt Hex, RGB en HSL automatisch af.\nconst backgroundColor=useTransform(scrollY,positions,colors);// Helper om kleur op de hele pagina toe te passen\nconst applyTheme=color=>{if(typeof document===\"undefined\")return;// 1. Update de body achtergrond\ndocument.body.style.backgroundColor=color;// 2. Update de meta-tag voor iOS Safari bars\nlet meta=document.querySelector('meta[name=\"theme-color\"]');if(!meta){meta=document.createElement(\"meta\");meta.setAttribute(\"name\",\"theme-color\");document.head.appendChild(meta);}meta.setAttribute(\"content\",color);};// Effect voor initiële kleurzetting en opschonen\nuseEffect(()=>{// Direct de juiste kleur pakken (voorkomt witte flits)\nconst initialColor=backgroundColor.get();applyTheme(initialColor);// Activeer vloeiende overgang na de eerste frame\nconst timeout=setTimeout(()=>{document.body.style.transition=`background-color ${animationSpeed}s ease-out`;},50);return()=>{clearTimeout(timeout);document.body.style.backgroundColor=\"\";document.body.style.transition=\"\";};},[animationSpeed,backgroundColor]);// Update kleur tijdens het scrollen\nuseMotionValueEvent(backgroundColor,\"change\",latest=>{applyTheme(latest);});return null// Render niets in de DOM\n;}// --- Styling voor Preview ---\nconst previewContainerStyle={width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",overflow:\"hidden\"};const previewBarStyle={flex:1,display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",padding:\"0 15px\",borderBottom:\"1px solid rgba(255,255,255,0.1)\"};// --- Framer Controls ---\naddPropertyControls(AnimatedBackground,{colorStops:{type:ControlType.Array,title:\"Kleur Punten\",control:{type:ControlType.Object,controls:{position:{type:ControlType.Number,title:\"Scroll Px\",min:0,max:1e4,step:10,defaultValue:0},color:{type:ControlType.Color,title:\"Kleur\",defaultValue:\"#0000FF\"}}},defaultValue:[{position:0,color:\"#FFFFE0\"},{position:1e3,color:\"#0000FF\"}]},animationSpeed:{type:ControlType.Number,title:\"Snelheid\",defaultValue:.5,min:0,max:2,step:.1,unit:\"s\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedBackground\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedBackground.map"],"mappings":"wPAGG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,aAAW,CAAC,CAAC,SAAS,EAAE,MAAM,SAAS,EAAE,CAAC,SAAS,KAAK,MAAM,SAAS,CAAC,EAAE,iBAAe,IAAI,EAAY,EAAS,EAAoB,EAC3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