{"version":3,"file":"shared-lib.Cs5E77L0.mjs","names":["React.useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/fuNAa1oBJaelkHsbLwkC/KtRT2AMedR0FwAlTqrPN/GlobalHeader.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\";function getImageSrc(value){return typeof value===\"string\"?value:value?.src;}function phoneToHref(phone){return`tel:${phone.replace(/[^\\d+]/g,\"\")}`;}/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight fixed\n */export default function GlobalHeader(props){const[isOpen,setIsOpen]=React.useState(false);const logoSrc=getImageSrc(props.logoImage);const accent=props.accent||\"#a6336b\";const homeHref=props.homeHref||\"/\";const contactEmail=props.contactEmail||\"info@enerquent.at\";const phoneNumber=props.phoneNumber||\"+43(0)72 35 22 100\";const mainLinks=[{label:\"Wohnkostenrechner\",href:\"/wohnkostenrechner\"},{label:\"Woody fragen\",href:\"/immowissen\"},{label:\"\\xdcber Enerquent\",href:\"/ueberenerquent\"},{label:\"Kontakt\",href:\"/kontakt\"}];const secondaryLinks=[{label:\"Impressum\",href:\"/impressum\"},{label:\"Datenschutz\",href:\"/impressum#datenschutz\"}];React.useEffect(()=>{if(!isOpen)return;const previousOverflow=document.body.style.overflow;document.body.style.overflow=\"hidden\";const handleKeyDown=event=>{if(event.key===\"Escape\")setIsOpen(false);};window.addEventListener(\"keydown\",handleKeyDown);return()=>{document.body.style.overflow=previousOverflow;window.removeEventListener(\"keydown\",handleKeyDown);};},[isOpen]);const closeMenu=()=>setIsOpen(false);const toggleMenu=()=>setIsOpen(value=>!value);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:responsiveCss(accent)}),/*#__PURE__*/_jsx(\"header\",{className:\"global-header\",style:styles.header,children:/*#__PURE__*/_jsxs(\"div\",{className:\"global-header-container\",style:styles.container,children:[/*#__PURE__*/_jsx(\"a\",{href:homeHref,style:styles.logoLink,\"aria-label\":\"Enerquent Startseite\",children:logoSrc?/*#__PURE__*/_jsx(\"img\",{src:logoSrc,alt:\"Enerquent\",style:styles.logoImage}):/*#__PURE__*/_jsx(\"span\",{style:styles.textLogo,children:\"Enerquent\"})}),/*#__PURE__*/_jsxs(\"button\",{type:\"button\",\"aria-label\":isOpen?\"Men\\xfc schlie\\xdfen\":\"Men\\xfc \\xf6ffnen\",\"aria-expanded\":isOpen,onClick:toggleMenu,className:isOpen?\"global-header-toggle is-open\":\"global-header-toggle\",style:styles.toggleButton,children:[/*#__PURE__*/_jsx(\"span\",{style:styles.toggleLine}),/*#__PURE__*/_jsx(\"span\",{style:styles.toggleLine}),/*#__PURE__*/_jsx(\"span\",{style:styles.toggleLine})]})]})}),isOpen&&/*#__PURE__*/_jsx(\"div\",{className:\"global-header-overlay\",style:styles.overlay,onMouseDown:closeMenu,role:\"dialog\",\"aria-modal\":\"true\",\"aria-label\":\"Navigation\",children:/*#__PURE__*/_jsxs(\"div\",{className:\"global-header-menu-surface\",style:styles.menuSurface,onMouseDown:event=>event.stopPropagation(),children:[/*#__PURE__*/_jsx(\"nav\",{style:styles.nav,\"aria-label\":\"Hauptnavigation\",children:mainLinks.map(item=>/*#__PURE__*/_jsx(\"a\",{href:item.href,onClick:closeMenu,className:\"global-header-link\",style:styles.mainLink,children:item.label},item.label))}),/*#__PURE__*/_jsxs(\"div\",{style:styles.panelBottom,children:[/*#__PURE__*/_jsx(\"div\",{style:styles.secondaryLinks,children:secondaryLinks.map(item=>/*#__PURE__*/_jsx(\"a\",{href:item.href,onClick:closeMenu,className:\"global-header-secondary-link\",style:styles.secondaryLink,children:item.label},item.label))}),/*#__PURE__*/_jsxs(\"div\",{style:styles.contactBlock,children:[/*#__PURE__*/_jsx(\"a\",{href:phoneToHref(phoneNumber),style:styles.contactLink,onClick:closeMenu,children:phoneNumber}),/*#__PURE__*/_jsx(\"a\",{href:`mailto:${contactEmail}`,style:styles.contactLink,onClick:closeMenu,children:contactEmail})]})]})]})})]});}GlobalHeader.defaultProps={homeHref:\"/\",contactEmail:\"info@enerquent.at\",phoneNumber:\"+43(0)72 35 22 100\",accent:\"#a6336b\"};addPropertyControls(GlobalHeader,{logoImage:{type:ControlType.Image,title:\"Logo\"},homeHref:{type:ControlType.Link,title:\"Home\",defaultValue:\"/\"},contactEmail:{type:ControlType.String,title:\"E-Mail\",defaultValue:\"info@enerquent.at\"},phoneNumber:{type:ControlType.String,title:\"Telefon\",defaultValue:\"+43(0)72 35 22 100\"},accent:{type:ControlType.Color,title:\"Akzent\",defaultValue:\"#a6336b\"}});const responsiveCss=accent=>`\n    @keyframes globalHeaderOverlayIn {\n        from { opacity: 0; }\n        to { opacity: 1; }\n    }\n\n    @keyframes globalHeaderPanelIn {\n        from {\n            opacity: 0;\n            transform: translateY(-6px);\n        }\n        to {\n            opacity: 1;\n            transform: translateY(0);\n        }\n    }\n\n    .global-header-container {\n        width: 100%;\n        max-width: 1200px;\n        margin-left: auto;\n        margin-right: auto;\n        padding-left: 24px;\n        padding-right: 24px;\n        box-sizing: border-box;\n    }\n\n    .global-header-toggle {\n        transition: opacity 160ms ease;\n    }\n\n    .global-header-toggle:hover {\n        opacity: 0.72;\n    }\n\n    .global-header-toggle span {\n        transition: transform 180ms ease, opacity 140ms ease;\n    }\n\n    .global-header-toggle.is-open span:nth-child(1) {\n        transform: translateY(6px) rotate(45deg);\n    }\n\n    .global-header-toggle.is-open span:nth-child(2) {\n        opacity: 0;\n    }\n\n    .global-header-toggle.is-open span:nth-child(3) {\n        transform: translateY(-6px) rotate(-45deg);\n    }\n\n    .global-header-link,\n    .global-header-secondary-link {\n        transition: color 160ms ease;\n    }\n\n    .global-header-link:hover,\n    .global-header-secondary-link:hover {\n        color: ${accent} !important;\n    }\n\n    @media (max-width: 809px) {\n        .global-header-container {\n            padding-left: 16px;\n            padding-right: 16px;\n        }\n\n        .global-header-menu-surface {\n            top: 86px !important;\n            right: 16px !important;\n            width: calc(100vw - 32px) !important;\n            padding: 24px !important;\n        }\n    }\n`;const styles={header:{position:\"fixed\",top:0,left:0,zIndex:10020,width:\"100%\",height:72,background:\"transparent\",borderBottom:\"none\",pointerEvents:\"none\"},container:{height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\"},logoLink:{display:\"inline-flex\",alignItems:\"center\",minHeight:44,textDecoration:\"none\",color:\"#29292f\",pointerEvents:\"auto\"},logoImage:{display:\"block\",maxHeight:38,maxWidth:180,objectFit:\"contain\"},textLogo:{fontSize:20,lineHeight:1,fontWeight:900,letterSpacing:\"-0.02em\",color:\"#ffffff\",textShadow:\"0 1px 18px rgba(0, 0, 0, 0.22)\"},toggleButton:{width:44,height:44,display:\"inline-flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",gap:4,padding:0,border:\"none\",borderRadius:999,background:\"transparent\",cursor:\"pointer\",pointerEvents:\"auto\"},toggleLine:{display:\"block\",width:18,height:2,borderRadius:99,background:\"#ffffff\",boxShadow:\"0 1px 12px rgba(0, 0, 0, 0.24)\",transformOrigin:\"center\"},overlay:{position:\"fixed\",inset:0,zIndex:9999,background:\"rgba(22, 21, 22, 0.22)\",backdropFilter:\"blur(2px)\",animation:\"globalHeaderOverlayIn 180ms ease-out\"},menuSurface:{position:\"fixed\",top:96,right:\"max(16px, calc((100vw - 1200px) / 2 + 24px))\",zIndex:10010,width:\"min(420px, calc(100vw - 56px))\",padding:\"28px 28px 24px\",borderRadius:24,background:\"rgba(72, 70, 72, 0.3)\",border:\"1px solid rgba(255, 255, 255, 0.18)\",backdropFilter:\"blur(18px)\",boxShadow:\"0 24px 80px rgba(0, 0, 0, 0.12)\",display:\"grid\",gap:28,animation:\"globalHeaderPanelIn 220ms ease-out\"},nav:{display:\"grid\",gap:14,width:\"100%\",textAlign:\"right\"},mainLink:{color:\"rgba(255, 255, 255, 0.9)\",textDecoration:\"none\",fontSize:22,lineHeight:1.32,fontWeight:560,letterSpacing:\"-0.005em\"},panelBottom:{marginTop:0,paddingTop:0,display:\"grid\",gap:16,width:\"100%\",textAlign:\"right\"},secondaryLinks:{display:\"flex\",flexWrap:\"wrap\",gap:16,justifyContent:\"flex-end\"},secondaryLink:{color:\"rgba(255, 255, 255, 0.64)\",textDecoration:\"none\",fontSize:13,lineHeight:1.4,fontWeight:520},contactBlock:{display:\"grid\",gap:6,paddingTop:14,borderTop:\"1px solid rgba(255, 255, 255, 0.18)\"},contactLink:{color:\"rgba(255, 255, 255, 0.66)\",textDecoration:\"none\",fontSize:13,lineHeight:1.45,fontWeight:520}};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GlobalHeader\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GlobalHeader.map"],"mappings":"6MAA+J,SAAS,EAAY,EAAM,CAAC,OAAO,OAAO,GAAQ,SAAS,EAAM,GAAO,IAAK,SAAS,EAAY,EAAM,CAAC,MAAM,OAAO,EAAM,QAAQ,UAAU,GAAG,GAG7S,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAe,GAAM,CAAO,EAAQ,EAAY,EAAM,UAAU,CAAO,EAAO,EAAM,QAAQ,UAAgB,EAAS,EAAM,UAAU,IAAU,EAAa,EAAM,cAAc,oBAA0B,EAAY,EAAM,aAAa,qBAA2B,EAAU,CAAC,CAAC,MAAM,oBAAoB,KAAK,qBAAqB,CAAC,CAAC,MAAM,eAAe,KAAK,cAAc,CAAC,CAAC,MAAM,iBAAoB,KAAK,kBAAkB,CAAC,CAAC,MAAM,UAAU,KAAK,WAAW,CAAC,CAAO,EAAe,CAAC,CAAC,MAAM,YAAY,KAAK,aAAa,CAAC,CAAC,MAAM,cAAc,KAAK,yBAAyB,CAAC,CAAC,MAAoB,CAAC,GAAG,CA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