import{r as t,j as e,aS as d,aE as m,t as u}from"./react-vendor-xYZnmIII.js";import{b2 as x,b3 as h,b4 as f,a as p,c as j,B as o}from"./ui-components-CQM92IK3.js";import v from"./instructor-socials-BcyB03fk.js";import{A as b}from"./embla-carousel-autoplay.esm-DjPwQPS4.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";const z=({data:l})=>{const[i,n]=t.useState(0),[s,c]=t.useState();return t.useEffect(()=>{if(!s)return;const r=()=>{n(s.selectedScrollSnap())};return s.on("select",r),()=>{s.off("select",r)}},[s]),e.jsxs(e.Fragment,{children:[e.jsx(x,{setApi:c,className:"relative z-10 my-5",opts:{align:"start",loop:!0},plugins:[b({delay:3e3})],children:e.jsx(h,{children:l&&l.collection.map(r=>e.jsx(f,{className:"basis-full md:basis-1/2 lg:basis-1/4",children:e.jsx("div",{className:"px-1.5 py-5",children:e.jsxs(p,{className:"group !shadow-card-lg relative overflow-hidden rounded-2xl",children:[e.jsx(d,{href:route("instructors.show",r.id),children:e.jsxs("div",{className:"relative h-[300px] overflow-hidden",children:[e.jsx("img",{className:"h-full w-full object-cover object-center",src:r.user.photo||"/assets/images/intro/default/instructors/instructor-1.png",alt:""}),e.jsxs("div",{className:"from-primary dark:from-primary-foreground absolute bottom-0 left-1/2 flex h-full w-full -translate-x-1/2 flex-col justify-end bg-gradient-to-t p-4 text-center opacity-0 transition-all duration-200 group-hover:opacity-100",children:[e.jsx("p",{className:"mb-1 text-lg font-semibold text-white",children:r.user.name}),e.jsx("p",{className:"text-sm text-white",children:r.designation})]})]})}),e.jsx(v,{instructor:r})]})})},r.id))})}),e.jsxs("div",{className:"relative z-10 flex items-center justify-between",children:[e.jsx("div",{className:"flex items-center justify-center gap-2.5",children:s&&l&&l.collection.map(({id:r},a)=>e.jsx("div",{className:j("cursor-pointer rounded-full transition-all duration-200",i===a?"bg-primary h-2 w-4":"h-2 w-2 bg-gray-300"),onClick:()=>s.scrollTo(a)},r))}),e.jsxs("div",{className:"space-x-4",children:[e.jsx(o,{size:"icon",variant:"outline",disabled:!(s!=null&&s.canScrollPrev()),onClick:()=>s==null?void 0:s.scrollPrev(),className:"hover:border-primary hover:bg-background",children:e.jsx(m,{})}),e.jsx(o,{size:"icon",variant:"outline",disabled:!(s!=null&&s.canScrollNext()),onClick:()=>s==null?void 0:s.scrollNext(),className:"hover:border-primary hover:bg-background",children:e.jsx(u,{})})]})]})]})};export{z as default};
