import{aT as x,r as o,j as s,aE as h,t as f}from"./react-vendor-xYZnmIII.js";import{B as j}from"./blog-card-1-62_VNbIC.js";import{b2 as g,b3 as b,b4 as v,c as N,B as i}from"./ui-components-CQM92IK3.js";import{g as C,S as y}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 Q=()=>{const{props:c}=x(),{page:n,customize:m,blogs:a}=c,r=C(n,"blogs"),[e,d]=o.useState(),[p,u]=o.useState(0);return o.useEffect(()=>{if(!e)return;const t=()=>{u(e.selectedScrollSnap())};return e.on("select",t),()=>{e.off("select",t)}},[e]),s.jsxs(y,{customize:m,pageSection:r,containerClass:"z-10 py-20",children:[s.jsxs("div",{className:"mx-auto text-center md:max-w-2xl",children:[s.jsx("h2",{className:"mb-2 text-3xl font-bold sm:text-4xl",children:r==null?void 0:r.title}),s.jsx("p",{className:"text-muted-foreground",children:r==null?void 0:r.description})]}),s.jsx(g,{setApi:d,className:"py-10",opts:{align:"start",loop:!0},plugins:[S({delay:3e3})],children:s.jsx(b,{children:a.map(t=>s.jsx(v,{className:"basis-full md:basis-1/2 lg:basis-1/4",children:s.jsx("div",{className:"h-full px-1.5 py-0.5",children:s.jsx(j,{blog:t,className:"h-full"})})},t.id))})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center justify-center gap-2.5",children:e&&a.map(({id:t},l)=>s.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:()=>e.scrollTo(l)},t))}),s.jsxs("div",{className:"space-x-4",children:[s.jsx(i,{size:"icon",variant:"outline",disabled:!(e!=null&&e.canScrollPrev()),onClick:()=>e==null?void 0:e.scrollPrev(),className:"hover:border-primary hover:bg-background",children:s.jsx(h,{})}),s.jsx(i,{size:"icon",variant:"outline",disabled:!(e!=null&&e.canScrollNext()),onClick:()=>e==null?void 0:e.scrollNext(),className:"hover:border-primary hover:bg-background",children:s.jsx(f,{})})]})]})]})};export{Q as default};
