import{aT as x,r as a,j as e,aE as u,t as b}from"./react-vendor-xYZnmIII.js";import{C as h}from"./course-card-1-BR5P0gvB.js";import{b2 as g,b3 as j,b4 as v,c as N,B as i}from"./ui-components-CQM92IK3.js";import{g as y,S as C}from"./section-BOHF3o7C.js";import{A as S}from"./embla-carousel-autoplay.esm-DjPwQPS4.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";import"./use-lang-Dg6I_Fym.js";import"./chunked-uploader-input-dQEAsxxf.js";import"./input-error-_LAmvivg.js";import"./loading-button-D7aXR3K4.js";import"./inertia-FIn3q7f1.js";import"./icon-picker-dialog-jzY0-ZNJ.js";import"./icon-picker-e9MMAA5U.js";import"./debounce-CWHP_ANh.js";import"./icon-picker-tooltip-CR2ZyXZ1.js";import"./table-header-CjMHr8CW.js";import"./table-page-size-CzF8rJAG.js";import"./route-D0xh7FtZ.js";const O=()=>{const{props:n}=x(),{page:c,newCourses:o,customize:m}=n,[t,d]=a.useState(),[p,f]=a.useState(0),r=y(c,"new_courses");return a.useEffect(()=>{if(!t)return;const s=()=>{f(t.selectedScrollSnap())};return t.on("select",s),()=>{t.off("select",s)}},[t]),e.jsxs(C,{customize:m,pageSection:r,containerClass:"py-20",contentClass:"relative z-10",children:[e.jsxs("div",{className:"mx-auto text-center md:max-w-2xl",children:[e.jsx("p",{className:"text-secondary-foreground mb-1 font-medium",children:r==null?void 0:r.title}),e.jsx("h2",{className:"mb-4 text-3xl font-bold sm:text-4xl",children:r==null?void 0:r.sub_title}),e.jsx("p",{className:"text-muted-foreground",children:r==null?void 0:r.description})]}),e.jsx(g,{setApi:d,className:"z-10 py-10",opts:{align:"start",loop:!0},plugins:[S({delay:3e3})],children:e.jsx(j,{children:o.map(s=>e.jsx(v,{className:"basis-full md:basis-1/2 lg:basis-1/4",children:e.jsx("div",{className:"px-1.5 py-0.5",children:e.jsx(h,{course:s},s.id)})},s.id))})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"flex items-center justify-center gap-2.5",children:t&&o.map(({id:s},l)=>e.jsx("div",{className:N("cursor-pointer rounded-full transition-all duration-200",p===l?"bg-primary h-2 w-4":"h-2 w-2 bg-gray-300"),onClick:()=>t.scrollTo(l)},s))}),e.jsxs("div",{className:"space-x-4",children:[e.jsx(i,{size:"icon",variant:"outline",disabled:!(t!=null&&t.canScrollPrev()),onClick:()=>t==null?void 0:t.scrollPrev(),className:"hover:border-primary hover:bg-background",children:e.jsx(u,{})}),e.jsx(i,{size:"icon",variant:"outline",disabled:!(t!=null&&t.canScrollNext()),onClick:()=>t==null?void 0:t.scrollNext(),className:"hover:border-primary hover:bg-background",children:e.jsx(b,{})})]})]}),e.jsx("div",{className:"after:pointer-events-none after:absolute after:top-20 after:-left-10 after:h-[240px] after:w-[240px] after:rounded-full after:bg-[rgba(97,95,255,1))] after:blur-[290px] after:content-['']"}),e.jsx("div",{className:"after:pointer-events-none after:absolute after:-right-10 after:bottom-0 after:h-[240px] after:w-[240px] after:rounded-full after:bg-[rgba(0,167,111,1)] after:blur-[290px] after:content-['']"})]})};export{O as default};
