import{j as r,L as p,D as x,aT as g,u}from"./vendor-BKmmeuxg.js";import{C as h}from"./card-D9_SJYq6.js";import{u as b}from"./use-lang-YfV87_zl.js";import{c as j,l as c}from"./utils-DxSsnXxD.js";import{g as f,S as y}from"./section-Bz0LxI_C.js";import"./dialog-B2gN9MvT.js";import"./chunked-uploader-input-D0XPVOTS.js";import"./button-BpNwv2aE.js";import"./index-WW_1X1qx.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";import"./avatar-j28afJTV.js";const N=({category:o,className:t,...e})=>{const{common:m}=b();return r.jsx(p,{href:route("category.courses",{category:o.slug}),children:r.jsxs(h,{className:j("hover:!shadow-card min:h-[110px] bg-secondary-lighter border-secondary-light text-secondary-foreground gap-4 rounded-2xl p-5 !shadow-none",t),...e,children:[r.jsx(x,{size:28,name:o.icon}),r.jsx("p",{className:"text-primary mt-4 mb-8 text-xl font-semibold",children:o.title}),r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsxs("p",{className:"text-sm",children:[o.courses_count," ",m.courses]}),r.jsx(g,{className:"h-4 w-4"})]})]})})},X=()=>{const{props:o}=u(),{page:t,customize:e,topCategories:m}=o,s=f(t,"top_categories"),i=["rgba(79,57,246,1)","rgba(0,122,85,1)","rgba(255,171,0,1)","rgba(236,0,63,1)","rgba(255,171,0,1)"];return r.jsxs(y,{customize:e,pageSection:s,containerClass:"z-10 py-20",children:[r.jsxs("div",{className:"bg-secondary/10 mx-auto mb-10 text-center md:max-w-2xl",children:[r.jsx("p",{className:"text-secondary-foreground mb-1 font-medium",children:s==null?void 0:s.title}),r.jsx("h2",{className:"mb-4 text-3xl font-bold sm:text-4xl",children:s==null?void 0:s.sub_title}),r.jsx("p",{className:"text-muted-foreground",children:s==null?void 0:s.description})]}),r.jsx("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",children:m.map((n,l)=>{const d=l%i.length,a=i[d];return r.jsx(N,{category:n,style:{color:a,borderColor:c(a,.15),backgroundColor:c(a,.04)}},n.id)})})]})};export{X as default};
