import{aT as f,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}=f(),{page:c,newCourses:o,customize:m}=n,[r,d]=a.useState(),[p,x]=a.useState(0),t=y(c,"new_courses");return a.useEffect(()=>{if(!r)return;const s=()=>{x(r.selectedScrollSnap())};return r.on("select",s),()=>{r.off("select",s)}},[r]),e.jsx("div",{className:"overflow-y-hidden bg-[url('/assets/images/intro/home-1/bg-line.png')] bg-cover bg-center py-20",children:e.jsxs(C,{customize:m,pageSection:t,containerClass:"relative",children:[e.jsxs("div",{className:"relative z-10",children:[e.jsxs("div",{className:"mx-auto text-center md:max-w-xl",children:[e.jsx("p",{className:"text-secondary-foreground mb-1 font-medium",children:t==null?void 0:t.title}),e.jsx("h2",{className:"mb-4 text-3xl font-bold sm:text-4xl",children:t==null?void 0:t.sub_title}),e.jsx("p",{className:"text-muted-foreground",children:t==null?void 0:t.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:r&&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:()=>r.scrollTo(l)},s))}),e.jsxs("div",{className:"space-x-4",children:[e.jsx(i,{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.jsx(u,{})}),e.jsx(i,{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.jsx(b,{})})]})]})]}),e.jsx("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(0,120,103,1)] after:blur-[180px] after:content-['']"}),e.jsx("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(97,95,255,1))] after:blur-[180px] after:content-['']"})]})})};export{O as default};
