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