import{jsxs as r,jsx as t}from"react/jsx-runtime";import{B as s,x as f,y as b}from"./ui-components-B24mpb8o.js";import{usePage as x,router as a}from"@inertiajs/react";import{LayoutDashboard as v,LogOut as y}from"lucide-react";import"next-themes";import"sonner";import"react";import"@radix-ui/react-label";import"class-variance-authority";import"@radix-ui/react-checkbox";import"@radix-ui/react-avatar";import"@radix-ui/react-dropdown-menu";import"@radix-ui/react-scroll-area";import"@radix-ui/react-popover";import"@radix-ui/react-radio-group";import"@radix-ui/react-dialog";import"@radix-ui/react-slot";import"clsx";import"@radix-ui/react-separator";import"@radix-ui/react-tooltip";import"@radix-ui/react-tabs";import"@radix-ui/react-accordion";import"@radix-ui/react-progress";import"@radix-ui/react-select";import"cmdk";import"@radix-ui/react-switch";import"react-day-picker";import"@radix-ui/react-slider";import"embla-carousel-react";import"@radix-ui/react-toggle-group";import"vaul";import"tailwind-merge";const Z=({tabs:m})=>{const{props:p}=x(),{auth:o,system:c,instructor:e,translate:d}=p,{button:i,common:l}=d;return r("div",{className:"w-[230px]",children:[r("div",{className:"mb-6 flex flex-col items-center",children:[t("div",{className:"h-[120px] w-[120px] overflow-hidden rounded-full",children:t("img",{alt:`${o.user.name}'s profile`,src:o.user.photo||"/assets/icons/avatar.png",className:"h-full w-full content-center object-cover"})}),t("h6",{className:"mt-8 mb-1 font-bold",children:o.user.name}),t("p",{className:"text-muted-foreground text-sm",children:o.user.email})]}),e&&e.status==="approved"&&r(s,{variant:"ghost",className:"text-muted-foreground h-11 w-full justify-start gap-3 rounded-none px-5 py-3 text-start",onClick:()=>a.get(route("dashboard")),children:[t(v,{className:"h-4 w-4"}),t("span",{children:l.dashboard})]}),r(f,{className:"grid h-auto grid-cols-1 gap-2 bg-transparent p-0",children:[m.map(({id:u,name:h,slug:n,Icon:g})=>r(b,{value:n,className:"hover:bg-secondary hover:text-secondary-foreground data-[state=active]:!bg-muted data-[state=active]:!text-secondary-foreground relative flex h-10 cursor-pointer items-center justify-start gap-3 rounded-md px-4 text-start",onClick:()=>a.get(route("student.index",{tab:n})),children:[t(g,{className:"h-4 w-4"}),t("span",{children:h})]},u)),r(s,{variant:"secondary",className:"bg-background text-primary hover:text-secondary-foreground h-10 w-full justify-start gap-3 rounded-md px-4",onClick:()=>a.post(route("logout")),children:[t(y,{className:"h-4 w-4"}),t("span",{children:i.logout})]})]}),(c.sub_type==="collaborative"&&!e||e&&e.status!=="approved")&&t(s,{variant:"outline",className:"hover:bg-background border-secondary-light mt-7 w-full",onClick:()=>a.get(route("student.index",{tab:"instructor"})),children:i.become_instructor})]})};export{Z as default};
