import{jsxs as o,Fragment as p,jsx as r}from"react/jsx-runtime";import{b1 as d,b2 as u,b3 as h,a as f,c as v,B as s}from"./ui-components-B24mpb8o.js";import b from"./instructor-socials-BXNMa78k.js";import{Link as g}from"@inertiajs/react";import x from"embla-carousel-autoplay";import{ChevronLeft as N,ChevronRight as y}from"lucide-react";import{useState as a,useEffect as C}from"react";import"next-themes";import"sonner";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 oe=({data:i})=>{const[n,c]=a(0),[e,m]=a();return C(()=>{if(!e)return;const t=()=>{c(e.selectedScrollSnap())};return e.on("select",t),()=>{e.off("select",t)}},[e]),o(p,{children:[r(d,{setApi:m,className:"relative z-10 my-5",opts:{align:"start",loop:!0},plugins:[x({delay:3e3})],children:r(u,{children:i&&i.collection.map(t=>r(h,{className:"basis-full md:basis-1/2 lg:basis-1/4",children:r("div",{className:"px-1.5 py-5",children:o(f,{className:"group !shadow-card-lg relative overflow-hidden rounded-2xl",children:[r(g,{href:route("instructors.show",t.id),children:o("div",{className:"relative h-[300px] overflow-hidden",children:[r("img",{className:"h-full w-full object-cover object-center",src:t.user.photo||"/assets/images/intro/default/instructors/instructor-1.png",alt:""}),o("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:[r("p",{className:"mb-1 text-lg font-semibold text-white",children:t.user.name}),r("p",{className:"text-sm text-white",children:t.designation})]})]})}),r(b,{instructor:t})]})})},t.id))})}),o("div",{className:"relative z-10 flex items-center justify-between",children:[r("div",{className:"flex items-center justify-center gap-2.5",children:e&&i&&i.collection.map(({id:t},l)=>r("div",{className:v("cursor-pointer rounded-full transition-all duration-200",n===l?"bg-primary h-2 w-4":"h-2 w-2 bg-gray-300"),onClick:()=>e.scrollTo(l)},t))}),o("div",{className:"space-x-4",children:[r(s,{size:"icon",variant:"outline",disabled:!(e!=null&&e.canScrollPrev()),onClick:()=>e==null?void 0:e.scrollPrev(),className:"hover:border-primary hover:bg-background",children:r(N,{})}),r(s,{size:"icon",variant:"outline",disabled:!(e!=null&&e.canScrollNext()),onClick:()=>e==null?void 0:e.scrollNext(),className:"hover:border-primary hover:bg-background",children:r(y,{})})]})]})]})};export{oe as default};
