import{u as x,r as o,j as r,ba as h,a3 as f}from"./vendor-BKmmeuxg.js";import{B as j}from"./blog-card-1-Bh9qzmqN.js";import{B as l}from"./button-BpNwv2aE.js";import{C as g,A as b,a as v,b as N}from"./embla-carousel-autoplay.esm-D5sNokAK.js";import{g as C,S as y}from"./section-Bz0LxI_C.js";import{c as S}from"./utils-DxSsnXxD.js";import"./card-D9_SJYq6.js";import"./avatar-j28afJTV.js";import"./index-WW_1X1qx.js";import"./dialog-B2gN9MvT.js";import"./use-lang-YfV87_zl.js";import"./chunked-uploader-input-D0XPVOTS.js";import"./input-DM0goJrn.js";import"./index-D9-QKOod.js";import"./input-error-LaPr_4wd.js";import"./loading-button-BnTVAMJ7.js";import"./label-HmIcv5Yx.js";import"./textarea-CyndvowL.js";import"./inertia-SZXqLvQm.js";import"./icon-picker-dialog-AqyWbPod.js";import"./icon-picker-iXyBXP6r.js";import"./debounce-CWHP_ANh.js";import"./tooltip-BsX7Z6vz.js";import"./scroll-area-C8HGru-R.js";import"./table-header-DVkEnG6Y.js";import"./table-DWOXv4Pu.js";import"./table-page-size-OCfjNXER.js";import"./dropdown-menu-DO-po5c1.js";import"./route-B4ZMN77y.js";const ee=()=>{const{props:c}=x(),{page:m,customize:n,blogs:a}=c,s=C(m,"blogs"),[e,p]=o.useState(),[d,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]),r.jsxs(y,{customize:n,pageSection:s,containerClass:"z-10 py-20",children:[r.jsxs("div",{className:"mx-auto text-center md:max-w-2xl",children:[r.jsx("h2",{className:"mb-2 text-3xl font-bold sm:text-4xl",children:s==null?void 0:s.title}),r.jsx("p",{className:"text-muted-foreground",children:s==null?void 0:s.description})]}),r.jsx(g,{setApi:p,className:"py-10",opts:{align:"start",loop:!0},plugins:[b({delay:3e3})],children:r.jsx(v,{children:a.map(t=>r.jsx(N,{className:"basis-full md:basis-1/2 lg:basis-1/4",children:r.jsx("div",{className:"h-full px-1.5 py-0.5",children:r.jsx(j,{blog:t,className:"h-full"})})},t.id))})}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"flex items-center justify-center gap-2.5",children:e&&a.map(({id:t},i)=>r.jsx("div",{className:S("cursor-pointer rounded-full transition-all duration-200",d===i?"bg-primary h-2 w-4":"h-2 w-2 bg-gray-300"),onClick:()=>e.scrollTo(i)},t))}),r.jsxs("div",{className:"space-x-4",children:[r.jsx(l,{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.jsx(h,{})}),r.jsx(l,{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.jsx(f,{})})]})]})]})};export{ee as default};
