import{aT as i,j as e}from"./react-vendor-xYZnmIII.js";import{r as l,E as c,F as p,G as m,H as x}from"./ui-components-CQM92IK3.js";import h from"./lesson-BzgjU3yb.js";import j from"./quiz-DzuMXOrP.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";import"./lesson-icons-DmUU9hn_.js";const T=()=>{const{props:a}=i(),{modules:t,watchHistory:d}=a,o=l(d);return e.jsx(e.Fragment,{children:t.length>0?e.jsx(c,{type:"single",collapsible:!0,className:"space-y-4",defaultValue:t[0].id,children:t.map((s,n)=>e.jsxs(p,{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(x,{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:o},r.id)),s.section_quizzes.map(r=>e.jsx(j,{quiz:r,completed:o},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{T as default};
