import{jsxs as t,jsx as r}from"react/jsx-runtime";import{C as b}from"./course-card-1-DFk6PmIT.js";import{R as C}from"./rating-stars-a-rkeoeH.js";import{A as T,h as A,i as P,Z as d,a6 as h,a7 as u,B as g,a8 as v}from"./ui-components-B24mpb8o.js";import{L as j}from"./landing-layout-D335TIc1.js";import{g as k}from"./route-D0xh7FtZ.js";import{usePage as L,Head as z,router as f}from"@inertiajs/react";import{Users as B,Book as D,Star as F,Grid as I,List as R}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";import"./index-CUpX7x90.js";import"./app-logo-CAnM-q9p.js";import"lucide-react/dynamic";import"./main-Cv60h411.js";import"./theme-colors-CLpwvDr4.js";import"./use-auth-cj50aT3v.js";import"./use-screen-CJI_WQZy.js";import"./appearance-zLWEcDPI.js";import"./language-79bZLpyc.js";import"./notification-BBQVVMqD.js";import"date-fns";import"./profile-toggle-E46Ne1rK.js";import"nanoid";const S=s=>{var n;const{instructor:x,translate:N}=s,{frontend:i,common:o}=N,{url:w}=L(),a=(n=k(w).view)!=null?n:"grid",{id:m,user:e,courses:c,total_reviews_count:y,total_average_rating:l,total_enrollments_count:_}=x;return t("div",{className:"container space-y-10 py-10 md:py-16",children:[r(z,{title:`${e.name} - ${i.instructor_profile}`}),t("div",{children:[t("div",{className:"flex items-center gap-4",children:[t(T,{className:"h-12 w-12",children:[r(A,{src:e.photo||"",alt:e.name,className:"object-cover"}),r(P,{children:e.name.charAt(0)})]}),t("div",{className:"group",children:[r("h3",{className:"text-xl font-semibold",children:e.name}),r("p",{className:"text-gray-500",children:e.email})]}),t("div",{className:"ml-auto flex items-center gap-1",children:[r("span",{className:"text-xl font-semibold",children:l?Number(l).toFixed(1):0}),r(C,{rating:l||0,starClass:"h-4 w-4"})]})]}),t("div",{className:"mt-6 flex gap-8",children:[t("div",{className:"flex items-center gap-2",children:[r(B,{className:"h-5 w-5 text-gray-500"}),t("span",{children:[_," ",o.students]})]}),t("div",{className:"flex items-center gap-2",children:[r(D,{className:"h-5 w-5 text-gray-500"}),t("span",{children:[c.length," ",o.courses]})]}),t("div",{className:"flex items-center gap-2",children:[r(F,{className:"h-5 w-5 text-gray-500"}),t("span",{children:[y," ",o.reviews]})]})]})]}),t("div",{className:"mb-4 flex items-center justify-between",children:[r("h2",{className:"text-2xl font-bold",children:i.all_courses}),t("div",{className:"flex items-center space-x-2",children:[r(d,{delayDuration:0,children:t(h,{children:[r(u,{asChild:!0,children:r(g,{size:"icon",variant:a==="grid"?"default":"outline",onClick:()=>f.get(route("instructors.show",{instructor:m,view:"grid"})),children:r(I,{className:"h-4 w-4"})})}),r(v,{children:r("p",{children:i.grid_view})})]})}),r(d,{delayDuration:0,children:t(h,{children:[r(u,{asChild:!0,children:r(g,{size:"icon",variant:a==="list"?"default":"outline",onClick:()=>f.get(route("instructors.show",{instructor:m,view:"list"})),children:r(R,{className:"h-4 w-4"})})}),r(v,{children:r("p",{children:i.list_view})})]})})]})]}),r("div",{className:a==="grid"?"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3":"space-y-7",children:c.map(p=>r(b,{course:p,viewType:a},p.id))})]})};S.layout=s=>r(j,{children:s,customizable:!1});export{S as default};
