import{jsx as e,jsxs as i}from"react/jsx-runtime";import{C as b}from"./course-card-1-DFk6PmIT.js";import{b1 as h,b2 as g,b3 as v,c as x,B as s}from"./ui-components-B24mpb8o.js";import{g as N,S as y}from"./section-DjkqMKZX.js";import{usePage as C}from"@inertiajs/react";import w from"embla-carousel-autoplay";import{ChevronLeft as S,ChevronRight as k}from"lucide-react";import{useState as m,useEffect as j}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";import"./use-lang-Cw_jKJYs.js";import"./chunked-uploader-input-WemAY1Qi.js";import"axios";import"./input-error-BbsDx4-P.js";import"./loading-button-B_LaGOAp.js";import"./inertia-FIn3q7f1.js";import"./icon-picker-dialog-C9VejAFv.js";import"./icon-picker-DlQKexqz.js";import"./debounce-CWHP_ANh.js";import"./icon-picker-tooltip-BfucLgKc.js";import"lucide-react/dynamic";import"./table-header-DXTJ1r7-.js";import"@tanstack/react-table";import"./table-page-size-B94DPeOD.js";import"./route-D0xh7FtZ.js";const wr=()=>{const{props:n}=C(),{page:p,topCourses:a,customize:c}=n,[r,d]=m(),[f,u]=m(0),t=N(p,"top_courses");return j(()=>{if(!r)return;const o=()=>{u(r.selectedScrollSnap())};return r.on("select",o),()=>{r.off("select",o)}},[r]),e("div",{className:"overflow-y-hidden bg-[url('/assets/images/intro/home-1/bg-line.png')] bg-cover bg-center py-20",children:i(y,{customize:c,pageSection:t,containerClass:" relative",children:[i("div",{className:"relative z-10",children:[i("div",{className:"mx-auto text-center md:max-w-xl",children:[e("p",{className:"text-secondary-foreground mb-1 font-medium",children:t==null?void 0:t.title}),e("h2",{className:"mb-4 text-3xl font-bold sm:text-4xl",children:t==null?void 0:t.sub_title}),e("p",{className:"text-muted-foreground",children:t==null?void 0:t.description})]}),e(h,{setApi:d,className:"py-10",opts:{align:"start",loop:!0},plugins:[w({delay:3e3})],children:e(g,{children:a.map(o=>e(v,{className:"basis-full md:basis-1/2 lg:basis-1/4",children:e("div",{className:"px-1.5 py-0.5",children:e(b,{course:o},o.id)})},o.id))})}),i("div",{className:"flex items-center justify-between",children:[e("div",{className:"flex items-center justify-center gap-2.5",children:r&&a.map(({id:o},l)=>e("div",{className:x("cursor-pointer rounded-full transition-all duration-200",f===l?"bg-primary h-2 w-4":"h-2 w-2 bg-gray-300"),onClick:()=>r.scrollTo(l)},o))}),i("div",{className:"space-x-4",children:[e(s,{size:"icon",variant:"outline",disabled:!(r!=null&&r.canScrollPrev()),onClick:()=>r==null?void 0:r.scrollPrev(),className:"hover:border-primary hover:bg-background",children:e(S,{})}),e(s,{size:"icon",variant:"outline",disabled:!(r!=null&&r.canScrollNext()),onClick:()=>r==null?void 0:r.scrollNext(),className:"hover:border-primary hover:bg-background",children:e(k,{})})]})]})]}),e("div",{className:"after:pointer-events-none after:absolute after:top-20 after:right-0 after:h-[240px] after:w-[240px] after:rounded-full after:bg-[rgba(97,95,255,1))] after:blur-[180px] after:content-['']"}),e("div",{className:"after:pointer-events-none after:absolute after:bottom-20 after:left-0 after:h-[240px] after:w-[240px] after:rounded-full after:bg-[rgba(0,120,103,1)] after:blur-[180px] after:content-['']"})]})})};export{wr as default};
