import{r as x,a3 as m,s as j,j as e,N as s,K as r,H as h,a4 as f,a5 as u,a6 as g,a7 as p,a8 as v,a9 as N,aa as b}from"./index-CWMEhb0Z.js";const y=()=>{const[l,a]=x.useState("home");return x.useEffect(()=>{const i={root:null,rootMargin:"0% 0px -10% 0px",threshold:0},n=new IntersectionObserver(t=>{let o=!1;t.forEach(d=>{d.isIntersecting&&(a(d.target.id),o=!0)}),o||a("")},i),c=document.querySelectorAll("section[id]");return c.forEach(t=>{n.observe(t)}),()=>{c.forEach(t=>{n.unobserve(t)})}},[]),l};function w(){const l=m("(max-width: 1024px)"),[a,i]=x.useState(!1),{isAuthenticated:n}=j(),c=y(),t=o=>`group relative text-neutral-500 hover:text-main-300  ${c===o?"text-main-400":"text-neutral-500 "}`;return x.useEffect(()=>(l&&a?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[a,l]),e.jsxs(e.Fragment,{children:[e.jsx("nav",{className:"bg-[#D7F5FF96] sticky top-0 left-0 py-4 z-50 backdrop-blur-2xl",children:e.jsx("div",{className:"container mx-auto flex justify-between items-center",children:l?e.jsxs("div",{className:"grid grid-cols-3 place-items-center px-4 w-full",children:[e.jsx("button",{onClick:()=>i(!a),children:e.jsx(h,{icon:a?g:p,className:"text-main-400 size-8"})}),e.jsx("img",{src:"/logo_mobile.png",alt:"Dr. Marco logo",className:"w-auto h-12 object-contain"}),n&&e.jsx(u,{})]}):e.jsxs(e.Fragment,{children:[e.jsx(s,{to:"/",children:e.jsx("img",{src:"/logo.svg",alt:"logo"})}),e.jsxs("ul",{className:"flex space-x-8 text-lg",children:[e.jsx("li",{children:e.jsx("a",{href:"#about",className:t("about"),children:"About Dr. Marco"})}),e.jsx("li",{children:e.jsx(s,{to:"/courses",className:t("testimonials"),children:"Courses"})}),e.jsx("li",{children:e.jsx(s,{to:"/books",className:"group relative text-neutral-500 hover:text-main-300  ",children:"Books"})}),e.jsx("li",{children:e.jsx("a",{href:"#testimonials",className:"group relative text-neutral-500 hover:text-main-300",children:"Students Say"})}),e.jsx("li",{children:e.jsx("a",{href:"#contact",className:t("contact"),children:"Contact Us"})})]}),n?e.jsx("div",{className:"flex items-center space-x-4",children:e.jsxs("div",{className:"flex items-center gap-6 rounded-full px-4 py-2 bg-main-400 ",children:[e.jsx(r,{variant:"ghost",className:"hover:bg-transparent !p-0",children:e.jsx(h,{icon:f,className:"size-6 text-white"})}),e.jsx(u,{})]})}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(s,{to:"/auth/login",children:e.jsx(r,{className:"btn-secondary text-lg px-8 py-5",size:"lg",children:"Login"})}),e.jsx(s,{to:"/auth/register",children:e.jsx(r,{className:"btn-primary text-lg px-8 py-5",children:"Register"})})]})})]})})}),e.jsx(v,{children:l&&a&&e.jsx(N.div,{initial:{opacity:0,y:-50},animate:{opacity:1,y:0},exit:{opacity:0,y:-50},transition:{duration:.3,ease:"easeInOut"},className:"fixed top-[80px] left-0 w-full  bg-main-400/20 backdrop-blur-2xl z-40 p-8",children:e.jsxs("div",{className:"flex flex-col items-center justify-between h-full ",children:[e.jsxs("ul",{className:"flex flex-col items-center space-y-8 text-2xl mb-8",children:[e.jsx("li",{children:e.jsx("a",{href:"#about",onClick:()=>i(!1),className:"text-white hover:text-main-400",children:"About Dr. Marco"})}),e.jsx("li",{children:e.jsx(s,{to:"/courses",className:"text-white hover:text-main-400",children:"Courses"})}),e.jsx("li",{children:e.jsx(s,{to:"/books",className:"text-white hover:text-main-400",children:"Books"})}),e.jsx("li",{children:e.jsx("a",{href:"#testimonials",onClick:()=>i(!1),className:"text-white hover:text-main-400",children:"Students Say"})}),e.jsx("li",{children:e.jsx("a",{href:"#contact",onClick:()=>i(!1),className:"text-white hover:text-main-400",children:"Contact Us"})})]}),!n&&e.jsxs("div",{className:"flex flex-col items-center space-y-4 w-full",children:[e.jsx(s,{to:"/auth/login",className:"w-full",children:e.jsx(r,{className:"btn-secondary text-lg w-full py-6",children:"Login"})}),e.jsx(s,{to:"/auth/register",className:"w-full",children:e.jsx(r,{className:"btn-primary text-lg w-full py-6",children:"Register"})}),e.jsx(s,{to:"/auth/register?role=guest",className:"w-full",children:e.jsx(r,{className:"btn-primary text-lg w-full py-6",children:"Register as a guest"})})]})]})})})]})}function S(){return e.jsxs(e.Fragment,{children:[e.jsx(w,{}),e.jsx("main",{className:"overflow-hidden",children:e.jsx(b,{})})]})}export{S as default};
