{"version":3,"file":"HelpNav.JrMBT49u.mjs","names":["useState","__esmMin","init_ssg_sandbox_shims","te","window","_e","init_jsx_runtime","c","p","init_npm_react_18_3_1","ce","addPropertyControls","init_framer_CaDWdxiz","ControlType","fromPath","clean","path","exact","links","link","HelpNav","props","current","setCurrent","active","found","selected","CSS","init_HelpNav"],"sources":["https:/framerusercontent.com/modules/jsMnc5aGqWNDNuaUAdQU/lKY7B280i7ZeYeontpy3/HelpNav.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState,startTransition}from\"react\";// Button bar shared by the help pages (/hjaelp, /videoguides, /guides, guide pages, /kontakt).\n// Same links and look as the bar at the top of the ZafeHelpCenter component.\nconst links=[{key:\"hjaelp\",label:\"Hj\\xe6lp & FAQ\",href:\"/hjaelp\"},{key:\"videoguides\",label:\"Videoguides\",href:\"/videoguides\"},{key:\"guides\",label:\"Guides\",href:\"/guides\"},{key:\"smartlaas\",label:\"Smartl\\xe5s til hovedd\\xf8ren\",href:\"/guides/smartlaas-til-hoveddoeren\"},{key:\"kontakt\",label:\"Kontakt\",href:\"/kontakt\"}];// \"auto\" picks the link from the address, so one instance works on every guide page.\nfunction fromPath(path){const clean=path.replace(/\\/+$/,\"\")||\"/\";const exact=links.find(link=>link.href===clean);if(exact)return exact.key;if(clean.startsWith(\"/guides\"))return\"guides\";return\"auto\";}const CSS=`\n.zhn{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0;padding:0 0 16px;list-style:none}\n.zhn a{display:inline-flex;align-items:center;min-height:40px;padding:0 16px;border-radius:999px;border:1px solid #bed4db;background:#fff;color:#16363f;font-family:Poppins,sans-serif;font-weight:600;font-size:14px;line-height:1;text-decoration:none;white-space:nowrap;transition:background .2s ease,color .2s ease}\n.zhn a:hover{background:#e8f2f4}\n.zhn a[aria-current=\"page\"]{background:#16363f;border-color:#16363f;color:#fff}\n.zhn a:focus-visible{outline:2px solid #2b7887;outline-offset:2px}\n@media (max-width:809px){.zhn a{min-height:38px;padding:0 14px;font-size:13px}}\n`;/**\n * Help Nav\n *\n * @framerIntrinsicWidth 760\n * @framerIntrinsicHeight 56\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function HelpNav(props){const{active=\"auto\"}=props;// \"auto\" is only used on the guide template, so \"Guides\" is the right first guess before the address is read.\nconst[current,setCurrent]=useState(active===\"auto\"?\"guides\":active);useEffect(()=>{if(active!==\"auto\"||typeof window===\"undefined\")return;const found=fromPath(window.location.pathname);if(found!==\"auto\")startTransition(()=>setCurrent(found));},[active]);const selected=active===\"auto\"?current:active;return /*#__PURE__*/_jsxs(\"nav\",{\"aria-label\":\"Hj\\xe6lp\",style:{...props.style,width:\"100%\"},children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsx(\"ul\",{className:\"zhn\",children:links.map(link=>/*#__PURE__*/_jsx(\"li\",{children:/*#__PURE__*/_jsx(\"a\",{href:link.href,\"aria-current\":selected===link.key?\"page\":undefined,children:link.label})},link.key))})]});}addPropertyControls(HelpNav,{active:{type:ControlType.Enum,title:\"Aktiv\",options:[\"auto\",\"hjaelp\",\"videoguides\",\"guides\",\"smartlaas\",\"kontakt\"],optionTitles:[\"Automatisk\",\"Hj\\xe6lp & FAQ\",\"Videoguides\",\"Guides\",\"Smartl\\xe5s til hovedd\\xf8ren\",\"Kontakt\"],defaultValue:\"auto\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HelpNav\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"56\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"760\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HelpNav.map"],"mappings":"A,6MAGA,SAASc,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