import{u as i,j as e}from"./vendor-rThclpOQ.js";import{A as l,a as c,b as m,c as p}from"./accordion-by19KtHq.js";import{g as x}from"./utils-8KAaAB9H.js";import h from"./lesson-Dmrk1xFQ.js";import u from"./quiz-BonoK4LR.js";import"./lesson-icons-B9LtvdzF.js";const v=()=>{const{props:a}=i(),{modules:o,watchHistory:d}=a,t=x(d);return e.jsx(e.Fragment,{children:o.length>0?e.jsx(l,{type:"single",collapsible:!0,className:"space-y-4",defaultValue:o[0].id,children:o.map((s,n)=>e.jsxs(c,{value:s.id,className:"overflow-hidden rounded-lg border",children:[e.jsxs(m,{className:"[&[data-state=open]]:!bg-muted px-4 py-3 text-base hover:no-underline",children:[n+1,". ",s.title]}),e.jsx(p,{className:"space-y-2 p-2",children:s.section_lessons.length>0?e.jsxs(e.Fragment,{children:[s.section_lessons.map(r=>e.jsx(h,{lesson:r,completed:t},r.id)),s.section_quizzes.map(r=>e.jsx(u,{quiz:r,completed:t},r.id))]}):e.jsx("div",{className:"px-4 py-3 text-center",children:e.jsx("p",{children:"There is no lesson added"})})})]},s.id))}):e.jsx("div",{className:"p-6 text-center",children:e.jsx("p",{children:"There is no section added"})})})};export{v as default};
