import{u as h,aA as x,aB as g,aC as c,aD as j,j as s,e as o,aE as w,aF as f}from"./vendor-BKmmeuxg.js";import{A as N,a as b,b as C}from"./avatar-j28afJTV.js";import{D,a as I,b as A,c as n}from"./dropdown-menu-DO-po5c1.js";import{n as r}from"./index.browser-OxPLOBIU.js";const y=()=>{var l;const{props:t}=h(),{user:a}=t.auth,{button:e}=t.translate,i=[{id:r(),name:e.my_courses,slug:"courses",Icon:x},{id:r(),name:e.wishlist,slug:"wishlist",Icon:g},{id:r(),name:e.profile,slug:"profile",Icon:c},{id:r(),name:e.settings,slug:"settings",Icon:j}];return s.jsxs(D,{children:[s.jsx(I,{className:"cursor-pointer outline-none",children:a&&a.photo?s.jsxs(N,{className:"h-9 w-9",children:[s.jsx(b,{src:a.photo,alt:a.name??"",className:"h-full w-full content-center object-cover"}),s.jsx(C,{children:(l=a.name)==null?void 0:l.charAt(0)})]}):s.jsx(c,{className:"text-muted-foreground h-9 w-9 rounded-full"})}),s.jsxs(A,{align:"end",className:"w-[160px]",children:[(a.role==="admin"||a.role==="instructor")&&s.jsxs(n,{className:"cursor-pointer px-3",onClick:()=>o.get(route("dashboard")),children:[s.jsx(w,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:e.dashboard})]}),(a.role==="student"||a.role==="instructor")&&i.map(({id:u,name:d,Icon:m,slug:p})=>s.jsxs(n,{className:"cursor-pointer px-3",onClick:()=>o.get(route("student.index",{tab:p})),children:[s.jsx(m,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:d})]},u)),s.jsxs(n,{className:"cursor-pointer px-3",onClick:()=>o.post("/logout"),children:[s.jsx(f,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:e.logout})]})]})]})};export{y as P};
