"use client"
import{d as i,g as c,i as t}from"./chunk-JP57AFGB.mjs";import{Menu as h,X as g}from"lucide-react";import l from"next/link";import{useParams as u}from"next/navigation";import{useEffect as p,useState as b}from"react";import k from"swr";import{Fragment as N,jsx as e,jsxs as s}from"react/jsx-runtime";var y=[{name:"Product",href:"/"},{name:"Pricing",href:"/pricing"},{name:"Help Center",href:"/help"},{name:"Docs",href:"/docs"},{name:"Blog",href:"/blog"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Brand",href:"/brand"}];function D({theme:d="light"}){let{domain:n="dub.co"}=u(),[a,r]=b(!1);p(()=>{a?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[a]);let{data:m}=k(n==="dub.co"&&"/api/auth/session",c,{dedupingInterval:6e4});return s("div",{className:t(d==="dark"&&"dark"),children:[e("button",{onClick:()=>r(!a),className:t("fixed right-3 top-3 z-40 rounded-full p-2 transition-colors duration-200 hover:bg-gray-200 focus:outline-none active:bg-gray-300 lg:hidden dark:hover:bg-white/20 dark:active:bg-white/30",a&&"hover:bg-gray-100 active:bg-gray-200"),children:a?e(g,{className:"h-5 w-5 text-gray-600 dark:text-white/70"}):e(h,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),e("nav",{className:t("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",a&&"animate-fade-in block"),children:s("ul",{className:"grid grid-cols-2",children:[y.map(({name:f,href:o},v)=>e("li",{className:"py-3",children:e(l,{href:n==="dub.co"?o:`https://dub.co${o}`,onClick:()=>r(!1),className:"flex w-full text-lg font-medium capitalize",children:f})},o)),m&&Object.keys(m).length>0?e("li",{className:"py-3",children:e(l,{href:i,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):s(N,{children:[e("li",{className:"py-3",children:e(l,{href:`${i}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),e("li",{className:"py-3",children:e(l,{href:`${i}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}export{D as a};
