import { jsxs, jsx } from "react/jsx-runtime";
import { T as Tabs } from "./tabs-DgXFE6Gu.js";
import { T as TabsList, a as TabsTrigger, b as TabsContent } from "./tabs-DmCK9qzK.js";
import { D as DashboardLayout } from "./layout-Cf9mPjOS.js";
import { router } from "@inertiajs/react";
import { FilePenLine, TvMinimalPlay, FileText, Settings, CircleDollarSign, BookText, FolderInput, FlaskConical } from "lucide-react";
import { nanoid } from "nanoid";
import Assignment from "./assignment-Cpq9KJ1M.js";
import Basic from "./basic-B81DZGE2.js";
import CourseUpdateHeader from "./course-update-header-BwJwOTWk.js";
import Curriculum from "./curriculum-B0kIDqeu.js";
import Info from "./info-CHWe4_ih.js";
import LiveClass from "./live-class-CoqktJgj.js";
import Media from "./media-DVHFsylG.js";
import Pricing from "./pricing-D9d3pVV2.js";
import SEO from "./seo-CEpq5QNh.js";
import Submissions from "./submissions-CBrzeDPR.js";
import "react";
import "@radix-ui/react-tabs";
import "./utils-DLCPGU0v.js";
import "clsx";
import "tailwind-merge";
import "./sidebar-C1tqSfnl.js";
import "@radix-ui/react-slot";
import "class-variance-authority";
import "./button-CdJZJLGw.js";
import "./separator-CSqU-rrB.js";
import "@radix-ui/react-separator";
import "./sheet-BOQ-e9_C.js";
import "@radix-ui/react-dialog";
import "./tooltip-BYKuzaoQ.js";
import "@radix-ui/react-tooltip";
import "./main-BKBelQb-.js";
import "next-themes";
import "sonner";
import "./appearance-BJIqrZL5.js";
import "./dropdown-menu-msun3TP8.js";
import "@radix-ui/react-dropdown-menu";
import "./language-mewnB-2r.js";
import "./notification-Bg6IzWOo.js";
import "./popover-Cv6Hz_y0.js";
import "@radix-ui/react-popover";
import "date-fns";
import "./scroll-area-CDdrLubh.js";
import "@radix-ui/react-scroll-area";
import "./app-logo-DWyi5bLn.js";
import "./accordion-cIAfVfPq.js";
import "@radix-ui/react-accordion";
import "./route-DlE7FdTW.js";
import "./avatar-C8iCpF5R.js";
import "@radix-ui/react-avatar";
import "./use-lang-44ndmTOc.js";
import "./table-header-CdEXSV6s.js";
import "./table-BMWNGY4o.js";
import "@tanstack/react-table";
import "./card-B-gBwpxd.js";
import "./assignment-table-column-BiDQOR4t.js";
import "./badge-J-zeQvMg.js";
import "./assignment-form-Bs7_RhfV.js";
import "./datetime-picker-BRbsgYE_.js";
import "react-day-picker";
import "./select-BYx0MCUK.js";
import "@radix-ui/react-select";
import "./input-error-D1JIzedA.js";
import "./loading-button-CCIxhJrY.js";
import "./checkbox--3Zj5G-w.js";
import "@radix-ui/react-checkbox";
import "./dialog-DGP_3dPQ.js";
import "./input-BsvJqbcd.js";
import "./label-0rIIfpX0.js";
import "@radix-ui/react-label";
import "./inertia-BtwbgBI3.js";
import "richtor";
/* empty css                 */
import "./combobox-BpeE9nB5.js";
import "cmdk";
import "./radio-group-Wf8uu9ZY.js";
import "@radix-ui/react-radio-group";
import "./textarea-Z0d4V-ti.js";
import "./course-languages-oEC7DuVF.js";
import "./data-sort-modal-DUjsJmGW.js";
import "nprogress";
import "./delete-modal-BrX_mlY2.js";
import "./lesson-form-J2VOck2C.js";
import "./chunked-uploader-input-CZfv7yqS.js";
import "axios";
import "./file-metadata-CvVo69cP.js";
import "./question-questions-BH-i7Uzj.js";
import "./question-form-e29UMxa-.js";
import "./tag-input-D5O17wz6.js";
import "@yaireo/tagify";
import "./quiz-form-DLw1AVQN.js";
import "./section-form-DIYHBO-_.js";
import "./resource-modal-BLhFKHA1.js";
import "./resource-form-jbsrlip7.js";
import "./resource-list-CYJm1CTd.js";
import "./faq-form-CG5kg18f.js";
import "./outcome-form-DBKqqmK1.js";
import "./requirement-form-DHpYqA0K.js";
import "./live-class-form-CM7nrk8J.js";
import "./live-class-status-B65ePfUK.js";
import "./video-player-DbcUPn7s.js";
import "plyr-react";
/* empty css                */
import "./course-durations-Cq7bB4fL.js";
import "./table-filter-aC0v-3Es.js";
import "./debounce-ZFxqVthq.js";
import "./table-page-size-CF314lUl.js";
import "./table-footer-BvAwBYor.js";
import "./submissions-table-column-Bhw-2q-9.js";
import "./grade-submission-dialog-At4heYQ5.js";
import "./assignment-grade-form-BUYKGynJ.js";
const Update = (props) => {
  const { tab, assignment, course, translate } = props;
  const { button } = translate;
  const tabs = [
    {
      id: nanoid(),
      name: button.curriculum,
      slug: "curriculum",
      Icon: FilePenLine,
      Component: Curriculum
    },
    {
      id: nanoid(),
      name: button.live_class,
      slug: "live-class",
      Icon: TvMinimalPlay,
      Component: LiveClass
    },
    {
      id: nanoid(),
      name: "Assignment",
      slug: "assignment",
      Icon: FileText,
      Component: assignment ? Submissions : Assignment
    },
    {
      id: nanoid(),
      name: button.basic,
      slug: "basic",
      Icon: Settings,
      Component: Basic
    },
    {
      id: nanoid(),
      name: button.pricing,
      slug: "pricing",
      Icon: CircleDollarSign,
      Component: Pricing
    },
    {
      id: nanoid(),
      name: button.info,
      slug: "info",
      Icon: BookText,
      Component: Info
    },
    {
      id: nanoid(),
      name: button.media,
      slug: "media",
      Icon: FolderInput,
      Component: Media
    },
    {
      id: nanoid(),
      name: button.seo,
      slug: "seo",
      Icon: FlaskConical,
      Component: SEO
    }
  ];
  return /* @__PURE__ */ jsxs("section", { className: "space-y-8", children: [
    /* @__PURE__ */ jsx(CourseUpdateHeader, {}),
    /* @__PURE__ */ jsxs(Tabs, { value: tab ?? tabs[0].slug, className: "grid grid-rows-1 gap-5 md:grid-cols-4", children: [
      /* @__PURE__ */ jsx("div", { className: "col-span-full md:col-span-1", children: /* @__PURE__ */ jsx(TabsList, { className: "horizontal-tabs-list space-y-1", children: tabs.map(({ id, name, slug, Icon }) => /* @__PURE__ */ jsxs(
        TabsTrigger,
        {
          value: slug,
          className: "horizontal-tabs-trigger",
          onClick: () => router.get(
            route("courses.edit", {
              course: course.id,
              tab: slug
            })
          ),
          children: [
            /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" }),
            /* @__PURE__ */ jsx("span", { children: name })
          ]
        },
        id
      )) }) }),
      /* @__PURE__ */ jsx("div", { className: "col-span-full md:col-span-3", children: tabs.map(({ id, slug, Component }) => /* @__PURE__ */ jsx(TabsContent, { value: slug, className: "m-0", children: /* @__PURE__ */ jsx(Component, {}) }, id)) })
    ] })
  ] });
};
Update.layout = (page) => /* @__PURE__ */ jsx(DashboardLayout, { children: page });
export {
  Update as default
};
