import{u as f,j as s,L as N,E as b,o as y,aC as m,aA as w,aB as k,aD as v,e as n,aE as C,aF as A,p as D}from"./vendor-BKmmeuxg.js";import{A as I}from"./app-logo-CmnEIwal.js";import{N as M}from"./notification-CYMPYbAP.js";import{A as L,a as S,b as z}from"./avatar-j28afJTV.js";import{B as d}from"./button-BpNwv2aE.js";import{D as E,a as B,b as _,c as i}from"./dropdown-menu-DO-po5c1.js";import{u as F}from"./sidebar-BYcYxQeZ.js";import{u as G}from"./use-screen-DU5n3V8C.js";import{n as a}from"./index.browser-OxPLOBIU.js";import"./utils-DxSsnXxD.js";import"./popover-B4kBsMuI.js";import"./scroll-area-C8HGru-R.js";import"./index-WW_1X1qx.js";import"./separator-_3LZ_wAA.js";import"./sheet-DSvHVmaW.js";import"./tooltip-BsX7Z6vz.js";const es=()=>{var l;const{screen:r}=G(),{open:u,toggleSidebar:c}=F(),{props:o}=f(),{translate:p}=o,{button:t}=p,e=o.auth.user;return s.jsx("header",{className:"bg-primary dark:bg-primary-dark text-primary-foreground dark:text-primary sticky top-0 z-50 h-[60px]",children:s.jsxs("div",{className:"flex h-full items-center justify-between gap-3 px-4 md:px-8",children:[s.jsx(N,{href:"/",children:s.jsx(I,{theme:"light"})}),s.jsx("p",{className:"hidden font-semibold sm:block",children:o.course.title}),s.jsxs("div",{className:"mr-0 flex items-center gap-2",children:[s.jsx(M,{}),r>768&&s.jsx(d,{size:"icon",variant:"secondary",onClick:()=>c(),className:"border-secondary-light text-secondary-foreground hover:text-secondary-foreground rounded-full",children:u?s.jsx(b,{}):s.jsx(y,{})}),s.jsxs(E,{children:[s.jsx(B,{className:"cursor-pointer outline-none",children:e&&e.photo?s.jsxs(L,{className:"h-9 w-9",children:[s.jsx(S,{src:e.photo,alt:e.name??"",className:"h-full w-full content-center object-cover"}),s.jsx(z,{children:(l=e.name)==null?void 0:l.charAt(0)})]}):s.jsx(m,{className:"text-muted-foreground h-9 w-9 rounded-full"})}),s.jsxs(_,{align:"end",children:[(e.role==="admin"||e.role==="instructor")&&s.jsxs(i,{className:"cursor-pointer px-3",onClick:()=>n.get(route("dashboard")),children:[s.jsx(C,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:t.dashboard})]}),(e.role==="student"||e.role==="instructor")&&H(t).map(({id:x,name:h,Icon:g,slug:j})=>s.jsxs(i,{className:"cursor-pointer px-3",onClick:()=>n.get(route("student.index",{tab:j})),children:[s.jsx(g,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:h})]},x)),s.jsxs(i,{className:"cursor-pointer px-3",onClick:()=>n.post("/logout"),children:[s.jsx(A,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:t.log_out})]})]})]}),r<768&&s.jsx(d,{size:"icon",variant:"secondary",onClick:()=>c(),className:"border-secondary-light text-secondary-foreground hover:text-secondary-foreground rounded-full",children:s.jsx(D,{})})]})]})})},H=r=>[{id:a(),name:r.my_courses,slug:"courses",Icon:w},{id:a(),name:r.wishlist,slug:"wishlist",Icon:k},{id:a(),name:r.profile,slug:"profile",Icon:m},{id:a(),name:r.settings,slug:"settings",Icon:v}];export{es as default};