{"version":3,"file":"MobileNav.CDePds35.mjs","names":["React.useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/qLqcWtgSJAPAKdIEzgtg/QjmJJ08JfWPuWHH9Geyi/MobileNav.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const BAR_HEIGHT=64;/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function MobileNav(props){const{logoText,logoLink,logoFont,links,linkFont,ctaLabel,ctaLink,ctaFont,scrollThreshold,barBackgroundTransparent,barBackgroundSolid,barTextColorTransparent,barTextColorSolid,menuBackground,menuTextColor,scrimColor,accentColor,accentTextColor,style}=props;const[open,setOpen]=React.useState(false);const[scrolled,setScrolled]=React.useState(false);const isSolid=open||scrolled;React.useEffect(()=>{if(typeof window===\"undefined\")return;const handleScroll=()=>{setScrolled(window.scrollY>(scrollThreshold??8));};handleScroll();window.addEventListener(\"scroll\",handleScroll,{passive:true});return()=>window.removeEventListener(\"scroll\",handleScroll);},[scrollThreshold]);// Lock page scroll while the menu is open, without letting the\n// scrollbar's disappearance shift/widen the page layout: measure how\n// wide the scrollbar was and compensate with matching right padding.\nReact.useEffect(()=>{if(!open)return;if(typeof window===\"undefined\")return;const scrollbarWidth=window.innerWidth-document.documentElement.clientWidth;const previousOverflow=document.body.style.overflow;const previousPaddingRight=document.body.style.paddingRight;const previousComputedPaddingRight=window.getComputedStyle(document.body).paddingRight;const existingPadding=parseFloat(previousComputedPaddingRight||\"0\")||0;document.body.style.overflow=\"hidden\";if(scrollbarWidth>0){document.body.style.paddingRight=`${existingPadding+scrollbarWidth}px`;}return()=>{document.body.style.overflow=previousOverflow;document.body.style.paddingRight=previousPaddingRight;};},[open]);const barBackground=isSolid?barBackgroundSolid:barBackgroundTransparent;const barTextColor=isSolid?barTextColorSolid:barTextColorTransparent;const logoStyle={...logoFont,fontWeight:700,color:barTextColor,textDecoration:\"none\",transition:\"color 0.25s ease\",whiteSpace:\"nowrap\"};const linkStyle={...linkFont,fontWeight:600,color:menuTextColor,textDecoration:\"none\",textAlign:\"left\"};const ctaStyle={...ctaFont,fontWeight:600,marginTop:8,width:\"100%\",background:accentColor,color:accentTextColor,textDecoration:\"none\",padding:\"14px 0\",borderRadius:12,textAlign:\"center\",boxSizing:\"border-box\",display:\"block\"};return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"fixed\",top:0,left:0,width:\"100%\",zIndex:1e4,...style},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",zIndex:3,display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",width:\"100%\",height:`calc(${BAR_HEIGHT}px + env(safe-area-inset-top, 0px))`,padding:\"env(safe-area-inset-top, 0px) 20px 0 20px\",background:barBackground,boxSizing:\"border-box\",transition:\"background 0.25s ease\"},children:[/*#__PURE__*/_jsx(\"a\",{href:logoLink||\"/\",style:logoStyle,children:logoText}),/*#__PURE__*/_jsx(\"button\",{\"aria-label\":open?\"Sluit menu\":\"Open menu\",\"aria-expanded\":open,onClick:()=>setOpen(v=>!v),style:{width:48,height:48,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:\"transparent\",border:\"none\",cursor:\"pointer\",padding:0,margin:0,flexShrink:0,overflow:\"visible\"},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",style:{display:\"block\",overflow:\"visible\"},children:[/*#__PURE__*/_jsx(\"line\",{x1:\"3\",y1:\"7\",x2:\"21\",y2:\"7\",stroke:barTextColor,strokeWidth:\"2\",strokeLinecap:\"round\",style:{transformOrigin:\"12px 7px\",transition:\"transform 0.25s ease, opacity 0.25s ease\",transform:open?\"translateY(5px) rotate(45deg)\":\"none\"}}),/*#__PURE__*/_jsx(\"line\",{x1:\"3\",y1:\"12\",x2:\"21\",y2:\"12\",stroke:barTextColor,strokeWidth:\"2\",strokeLinecap:\"round\",style:{transition:\"opacity 0.15s ease\",opacity:open?0:1}}),/*#__PURE__*/_jsx(\"line\",{x1:\"3\",y1:\"17\",x2:\"21\",y2:\"17\",stroke:barTextColor,strokeWidth:\"2\",strokeLinecap:\"round\",style:{transformOrigin:\"12px 17px\",transition:\"transform 0.25s ease, opacity 0.25s ease\",transform:open?\"translateY(-5px) rotate(-45deg)\":\"none\"}})]})})]}),open&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{onClick:()=>setOpen(false),\"aria-hidden\":\"true\",style:{position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100dvh\",background:scrimColor,zIndex:1}}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",zIndex:3,width:\"100%\",maxHeight:`calc(100dvh - ${BAR_HEIGHT}px - env(safe-area-inset-top, 0px))`,overflowY:\"auto\",background:menuBackground,display:\"flex\",flexDirection:\"column\",alignItems:\"stretch\",gap:20,padding:\"24px 20px 28px 20px\",boxSizing:\"border-box\"},children:[(links||[]).map((item,index)=>/*#__PURE__*/_jsx(\"a\",{href:item.link,onClick:()=>setOpen(false),style:linkStyle,children:item.label},`${item.link}-${index}`)),/*#__PURE__*/_jsx(\"a\",{href:ctaLink,onClick:()=>setOpen(false),style:ctaStyle,children:ctaLabel})]})]})]});}addPropertyControls(MobileNav,{logoText:{type:ControlType.String,title:\"Logo tekst\",defaultValue:\"IntercomExpert\"},logoLink:{type:ControlType.Link,title:\"Logo link\",defaultValue:\"/\"},logoFont:{type:ControlType.Font,title:\"Logo tekststijl\",controls:\"extended\",defaultValue:{fontSize:18}},links:{type:ControlType.Array,title:\"Menu-items\",control:{type:ControlType.Object,controls:{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Item\"},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"/\"}}},defaultValue:[{label:\"Diensten\",link:\"/diensten\"},{label:\"Uw situatie\",link:\"/uw-situatie\"},{label:\"Projecten\",link:\"/projecten\"},{label:\"Over ons\",link:\"/over-ons\"}]},linkFont:{type:ControlType.Font,title:\"Menu-item tekststijl\",controls:\"extended\",defaultValue:{fontSize:20}},ctaLabel:{type:ControlType.String,title:\"CTA label\",defaultValue:\"Contact\"},ctaLink:{type:ControlType.Link,title:\"CTA link\",defaultValue:\"/contact\"},ctaFont:{type:ControlType.Font,title:\"CTA tekststijl\",controls:\"extended\",defaultValue:{fontSize:16}},scrollThreshold:{type:ControlType.Number,title:\"Scroll-drempel (px)\",defaultValue:8,min:0,max:200,step:1},barBackgroundTransparent:{type:ControlType.Color,title:\"Balk (bovenaan) achtergrond\",defaultValue:\"rgba(0,0,0,0)\"},barBackgroundSolid:{type:ControlType.Color,title:\"Balk (scroll/open) achtergrond\",defaultValue:\"rgb(10, 35, 51)\"},barTextColorTransparent:{type:ControlType.Color,title:\"Balk tekst (bovenaan)\",defaultValue:\"rgb(255, 255, 255)\"},barTextColorSolid:{type:ControlType.Color,title:\"Balk tekst (scroll/open)\",defaultValue:\"rgb(255, 255, 255)\"},menuBackground:{type:ControlType.Color,title:\"Menu achtergrond\",defaultValue:\"rgb(10, 35, 51)\"},menuTextColor:{type:ControlType.Color,title:\"Menu tekst\",defaultValue:\"rgb(255, 255, 255)\"},scrimColor:{type:ControlType.Color,title:\"Achtergrond-verduistering\",defaultValue:\"rgba(10, 35, 51, 0.6)\"},accentColor:{type:ControlType.Color,title:\"Accentkleur (CTA)\",defaultValue:\"rgb(208, 255, 143)\"},accentTextColor:{type:ControlType.Color,title:\"CTA tekst\",defaultValue:\"rgb(0, 0, 0)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MobileNav\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MobileNav.map"],"mappings":"6MAGG,SAAwB,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