import { jsx, jsxs } from "react/jsx-runtime"; import { B as ButtonGradientPrimary } from "./button-gradient-primary-DnxbZRJu.js"; import { C as Card } from "./card-B-gBwpxd.js"; import { g as getPageSection, S as Section } from "./section-DPFpz4mP.js"; import { usePage, router } from "@inertiajs/react"; import "./button-CdJZJLGw.js"; import "react"; import "@radix-ui/react-slot"; import "class-variance-authority"; import "./utils-DLCPGU0v.js"; import "clsx"; import "tailwind-merge"; import "./dialog-DGP_3dPQ.js"; import "@radix-ui/react-dialog"; import "lucide-react"; 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 "./tooltip-BYKuzaoQ.js"; import "@radix-ui/react-tooltip"; 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"; import "./avatar-C8iCpF5R.js"; import "@radix-ui/react-avatar"; const TopCourse = () => { var _a, _b; const { props } = usePage(); const { page, topCourse, customize } = props; const topCourseSection = getPageSection(page, "top_course"); return /* @__PURE__ */ jsx(Section, { customize, pageSection: topCourseSection, containerClass: "py-20", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-end gap-20 md:grid-cols-2 md:gap-28", children: [ /* @__PURE__ */ jsxs("div", { className: "relative", children: [ /* @__PURE__ */ jsxs("div", { className: "relative z-10 mb-10", children: [ /* @__PURE__ */ jsx("p", { className: "text-secondary-foreground mb-1 font-medium", children: topCourseSection == null ? void 0 : topCourseSection.title }), /* @__PURE__ */ jsx("h2", { className: "mb-4 text-2xl font-bold sm:text-3xl", children: topCourse == null ? void 0 : topCourse.title }) ] }), /* @__PURE__ */ jsx( "img", { alt: topCourse == null ? void 0 : topCourse.title, src: (topCourse == null ? void 0 : topCourse.thumbnail) || "/assets/images/blank-image.jpg", className: "relative z-10 h-[348px] w-full rounded-xl object-cover object-center" } ), /* @__PURE__ */ jsx("div", { className: "after:pointer-events-none after:absolute after:top-1/2 after:left-1/2 after:h-[260px] after:w-[260px] after:-translate-x-1/2 after:-translate-y-1/2 after:rounded-full after:bg-[rgba(0,167,111,1)] after:blur-[290px] after:content-['']" }) ] }), /* @__PURE__ */ jsxs("div", { className: "relative", children: [ /* @__PURE__ */ jsxs("div", { className: "relative z-10 grid grid-cols-1 gap-7 pt-12 pb-7 sm:grid-cols-2", children: [ /* @__PURE__ */ jsxs(Card, { className: "px-6 py-7", children: [ /* @__PURE__ */ jsx("h2", { className: "mb-2 font-bold sm:text-3xl", children: topCourse == null ? void 0 : topCourse.formatted_duration }), /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Course Duration" }) ] }), /* @__PURE__ */ jsxs(Card, { className: "px-6 py-7", children: [ /* @__PURE__ */ jsx("h2", { className: "mb-2 font-bold sm:text-3xl", children: topCourse == null ? void 0 : topCourse.total_lessons }), /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [ "Course Lesson", (topCourse == null ? void 0 : topCourse.total_lessons) > 1 ? "s" : "" ] }) ] }), /* @__PURE__ */ jsxs(Card, { className: "px-6 py-7", children: [ /* @__PURE__ */ jsx("h2", { className: "mb-2 font-bold sm:text-3xl", children: topCourse == null ? void 0 : topCourse.total_quizzes }), /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [ "Total Quiz", (topCourse == null ? void 0 : topCourse.total_quizzes) > 1 ? "zes" : "" ] }) ] }), /* @__PURE__ */ jsxs(Card, { className: "px-6 py-7", children: [ /* @__PURE__ */ jsx("h2", { className: "mb-2 font-bold sm:text-3xl", children: topCourse == null ? void 0 : topCourse.enrollments_count }), /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [ "Enrolled Student", ((topCourse == null ? void 0 : topCourse.enrollments_count) ?? 0) > 1 ? "s" : "" ] }) ] }) ] }), ((_a = topCourseSection == null ? void 0 : topCourseSection.properties) == null ? void 0 : _a.button_text) && /* @__PURE__ */ jsx( ButtonGradientPrimary, { shadow: false, onClick: () => router.post(route("course-cart.store"), { course_id: topCourse.id }), className: "relative z-10 mt-10 md:mt-14", children: (_b = topCourseSection == null ? void 0 : topCourseSection.properties) == null ? void 0 : _b.button_text } ), /* @__PURE__ */ jsx("div", { className: "after:pointer-events-none after:absolute after:right-[120px] after:bottom-10 after:h-[200px] after:w-[200px] after:rounded-full after:bg-[rgba(97,95,255,1))] after:blur-[290px] after:content-['']" }) ] }) ] }) }); }; export { TopCourse as default };