import { jsxs, jsx } from "react/jsx-runtime"; import { C as CourseCard2 } from "./course-card-2-MxW7taLL.js"; import { T as Tabs } from "./tabs-DgXFE6Gu.js"; import { B as Button } from "./button-CdJZJLGw.js"; import { T as TabsList, a as TabsTrigger, b as TabsContent } from "./tabs-DmCK9qzK.js"; import { g as getPageSection, S as Section } from "./section-DPFpz4mP.js"; import { usePage, Link } from "@inertiajs/react"; import "./avatar-C8iCpF5R.js"; import "react"; import "@radix-ui/react-avatar"; import "./utils-DLCPGU0v.js"; import "clsx"; import "tailwind-merge"; import "./card-B-gBwpxd.js"; import "./tooltip-BYKuzaoQ.js"; import "@radix-ui/react-tooltip"; import "lucide-react"; import "@radix-ui/react-slot"; import "class-variance-authority"; import "@radix-ui/react-tabs"; import "./dialog-DGP_3dPQ.js"; import "@radix-ui/react-dialog"; import "./use-lang-44ndmTOc.js"; import "./chunked-uploader-input-CZfv7yqS.js"; import "./input-BsvJqbcd.js"; import "axios"; import "sonner"; import "./input-error-D1JIzedA.js"; import "./loading-button-CCIxhJrY.js"; import "./label-0rIIfpX0.js"; import "@radix-ui/react-label"; import "./textarea-Z0d4V-ti.js"; import "./inertia-BtwbgBI3.js"; import "./icon-picker-dialog-Bc1iwzL6.js"; import "./icon-picker-C-E-UbjO.js"; import "./debounce-ZFxqVthq.js"; import "lucide-react/dynamic"; import "./scroll-area-CDdrLubh.js"; import "@radix-ui/react-scroll-area"; import "./table-header-CdEXSV6s.js"; import "./table-BMWNGY4o.js"; import "@tanstack/react-table"; import "./table-page-size-CF314lUl.js"; import "./dropdown-menu-msun3TP8.js"; import "@radix-ui/react-dropdown-menu"; import "./route-DlE7FdTW.js"; const CategoryCourses = () => { var _a, _b, _c; const { props } = usePage(); const { page, customize, categoryTopCourses } = props; const categoryCoursesSection = getPageSection(page, "category_courses"); return /* @__PURE__ */ jsxs(Section, { customize, pageSection: categoryCoursesSection, containerClass: "py-20", children: [ /* @__PURE__ */ jsxs("div", { className: "mx-auto", children: [ /* @__PURE__ */ jsx("h2", { className: "mb-4 text-3xl font-bold sm:text-4xl", children: categoryCoursesSection == null ? void 0 : categoryCoursesSection.title }), /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: categoryCoursesSection == null ? void 0 : categoryCoursesSection.description }) ] }), categoryTopCourses[0] && /* @__PURE__ */ jsxs(Tabs, { defaultValue: categoryTopCourses[0].slug, children: [ /* @__PURE__ */ jsx("div", { className: "mt-6 flex w-full max-w-[1000px] overflow-x-auto overflow-y-hidden", children: /* @__PURE__ */ jsx(TabsList, { className: "h-[60px] justify-center px-2", children: categoryTopCourses.map((category) => /* @__PURE__ */ jsx(TabsTrigger, { value: category.slug, className: "h-11 cursor-pointer text-base", children: category.title }, category.id)) }) }), categoryTopCourses.map((category) => /* @__PURE__ */ jsx(TabsContent, { value: category.slug, className: "mt-10", children: category.courses && category.courses.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3", children: category.courses.map((course) => /* @__PURE__ */ jsx(CourseCard2, { course }, course.id)) }) : /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-center", children: "No courses found" }) }, category.id)) ] }), /* @__PURE__ */ jsx("div", { className: "mt-10 flex items-center justify-center", children: ((_a = categoryCoursesSection == null ? void 0 : categoryCoursesSection.properties) == null ? void 0 : _a.button_text) && /* @__PURE__ */ jsx(Button, { asChild: true, variant: "outline", className: "h-[42px] px-5", children: /* @__PURE__ */ jsx(Link, { href: ((_b = categoryCoursesSection == null ? void 0 : categoryCoursesSection.properties) == null ? void 0 : _b.button_link) || "", children: (_c = categoryCoursesSection == null ? void 0 : categoryCoursesSection.properties) == null ? void 0 : _c.button_text }) }) }) ] }); }; export { CategoryCourses as default };