import{jsx as r,Fragment as m,jsxs as i}from"react/jsx-runtime";import{r as a,D as l,E as c,F as h,G as u}from"./ui-components-B24mpb8o.js";import{usePage as g}from"@inertiajs/react";import f from"./lesson-cEFmoQS5.js";import x from"./quiz-DGaRmQBq.js";import"next-themes";import"sonner";import"react";import"@radix-ui/react-label";import"class-variance-authority";import"@radix-ui/react-checkbox";import"lucide-react";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"./lesson-icons-CkBBjsxb.js";const $=()=>{const{props:s}=g(),{modules:t,watchHistory:d}=s,p=a(d);return r(m,{children:t.length>0?r(l,{type:"single",collapsible:!0,className:"space-y-4",defaultValue:t[0].id,children:t.map((o,n)=>i(c,{value:o.id,className:"overflow-hidden rounded-lg border",children:[i(h,{className:"[&[data-state=open]]:!bg-muted px-4 py-3 text-base hover:no-underline",children:[n+1,". ",o.title]}),r(u,{className:"space-y-2 p-2",children:o.section_lessons.length>0?i(m,{children:[o.section_lessons.map(e=>r(f,{lesson:e,completed:p},e.id)),o.section_quizzes.map(e=>r(x,{quiz:e,completed:p},e.id))]}):r("div",{className:"px-4 py-3 text-center",children:r("p",{children:"There is no lesson added"})})})]},o.id))}):r("div",{className:"p-6 text-center",children:r("p",{children:"There is no section added"})})})};export{$ as default};
