import{jsxs as i,jsx as t}from"react/jsx-runtime";import{B as h}from"./blog-card-1-BvxNMtXV.js";import{b1 as g,b2 as x,b3 as b,c as v,B as l}from"./ui-components-B24mpb8o.js";import{g as N,S as y}from"./section-DjkqMKZX.js";import{usePage as C}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}=C(),{page:c,customize:n,blogs:m}=p,e=N(c,"blogs"),[r,d]=a(),[u,f]=a(0);return j(()=>{if(!r)return;const o=()=>{f(r.selectedScrollSnap())};return r.on("select",o),()=>{r.off("select",o)}},[r]),i(y,{customize:n,pageSection:e,containerClass:"z-10 py-20",children:[i("div",{className:"mx-auto text-center md:max-w-2xl",children:[t("p",{className:"text-secondary-foreground mb-1 font-medium",children:e==null?void 0:e.title}),t("h2",{className:"mb-4 text-3xl font-bold sm:text-4xl",children:e==null?void 0:e.sub_title}),t("p",{className:"text-muted-foreground",children:e==null?void 0:e.description})]}),t(g,{setApi:d,className:"py-10",opts:{align:"start",loop:!0},plugins:[S({delay:3e3})],children:t(x,{children:m.map(o=>t(b,{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(h,{blog:o,className:"h-full"})})},o.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:o},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)},o))}),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};
