import{aT as y,j as s,aR as _,cG as b,cM as C,bj as T,aX as m,cH as A,bn as P}from"./react-vendor-xYZnmIII.js";import{C as k}from"./course-card-1-BR5P0gvB.js";import{R as L}from"./rating-stars-BzA97NsB.js";import{A as R,h as z,i as B,_ as x,a7 as h,a8 as p,B as j,a9 as u}from"./ui-components-CQM92IK3.js";import{L as D}from"./landing-layout-hWcnW4wD.js";import{g as F}from"./route-D0xh7FtZ.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";import"./index-J6afNYNJ.js";import"./app-logo-BQGZ7CFC.js";import"./main-CnGu8e_N.js";import"./theme-colors-CLpwvDr4.js";import"./use-auth-l-ShkEGs.js";import"./use-screen-XQDPI5EM.js";import"./appearance-5ivIjthu.js";import"./language-C7bQIqs2.js";import"./notification-C3MPMjX2.js";import"./profile-toggle-CTDQohVW.js";import"./index.browser-OxPLOBIU.js";const G=t=>{var o;const{instructor:g,translate:v}=t,{frontend:a,common:i}=v,{url:f}=y(),r=(o=F(f).view)!=null?o:"grid",{id:c,user:e,courses:n,total_reviews_count:N,total_average_rating:l,total_enrollments_count:w}=g;return s.jsxs("div",{className:"container space-y-10 py-10 md:py-16",children:[s.jsx(_,{title:`${e.name} - ${a.instructor_profile}`}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs(R,{className:"h-12 w-12",children:[s.jsx(z,{src:e.photo||"",alt:e.name,className:"object-cover"}),s.jsx(B,{children:e.name.charAt(0)})]}),s.jsxs("div",{className:"group",children:[s.jsx("h3",{className:"text-xl font-semibold",children:e.name}),s.jsx("p",{className:"text-gray-500",children:e.email})]}),s.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[s.jsx("span",{className:"text-xl font-semibold",children:l?Number(l).toFixed(1):0}),s.jsx(L,{rating:l||0,starClass:"h-4 w-4"})]})]}),s.jsxs("div",{className:"mt-6 flex gap-8",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(b,{className:"h-5 w-5 text-gray-500"}),s.jsxs("span",{children:[w," ",i.students]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(C,{className:"h-5 w-5 text-gray-500"}),s.jsxs("span",{children:[n.length," ",i.courses]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(T,{className:"h-5 w-5 text-gray-500"}),s.jsxs("span",{children:[N," ",i.reviews]})]})]})]}),s.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[s.jsx("h2",{className:"text-2xl font-bold",children:a.all_courses}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(x,{delayDuration:0,children:s.jsxs(h,{children:[s.jsx(p,{asChild:!0,children:s.jsx(j,{size:"icon",variant:r==="grid"?"default":"outline",onClick:()=>m.get(route("instructors.show",{instructor:c,view:"grid"})),children:s.jsx(A,{className:"h-4 w-4"})})}),s.jsx(u,{children:s.jsx("p",{children:a.grid_view})})]})}),s.jsx(x,{delayDuration:0,children:s.jsxs(h,{children:[s.jsx(p,{asChild:!0,children:s.jsx(j,{size:"icon",variant:r==="list"?"default":"outline",onClick:()=>m.get(route("instructors.show",{instructor:c,view:"list"})),children:s.jsx(P,{className:"h-4 w-4"})})}),s.jsx(u,{children:s.jsx("p",{children:a.list_view})})]})})]})]}),s.jsx("div",{className:r==="grid"?"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3":"space-y-7",children:n.map(d=>s.jsx(k,{course:d,viewType:r},d.id))})]})};G.layout=t=>s.jsx(D,{children:t,customizable:!1});export{G as default};
