import{aT as d,j as e,cD as o,cE as m,b3 as x,cF as p,cA as h}from"./react-vendor-xYZnmIII.js";import{j,E as u,F as f,G as y,H as g}from"./ui-components-CQM92IK3.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";const F=({course:t})=>{const{props:c}=d(),{translate:n}=c,{frontend:i}=n,l=["video","video_url"];return e.jsxs(e.Fragment,{children:[e.jsx("h6",{className:"mb-4 text-xl font-semibold",children:i.course_curriculum}),e.jsx(j,{className:"my-6"}),e.jsx(u,{type:"single",collapsible:!0,className:"space-y-4",defaultValue:t.sections.length>0?t.sections[0].id:"",children:t.sections.map((a,r)=>e.jsxs(f,{value:a.id,className:"overflow-hidden rounded-lg border",children:[e.jsxs(y,{className:"[&[data-state=open]]:!bg-muted px-4 py-3 text-base hover:no-underline",children:[r+1,". ",a.title]}),e.jsx(g,{className:"space-y-1 p-4",children:a.section_lessons.length>0?e.jsxs(e.Fragment,{children:[a.section_lessons.map(s=>e.jsxs("div",{className:"flex items-center justify-between gap-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"bg-secondary flex h-6 w-6 items-center justify-center rounded-full",children:[l.includes(s.lesson_type)&&e.jsx(o,{className:"h-4 w-4"}),["document","iframe"].includes(s.lesson_type)&&e.jsx(m,{className:"h-4 w-4"}),s.lesson_type==="text"&&e.jsx(x,{className:"h-4 w-4"}),s.lesson_type==="image"&&e.jsx(p,{className:"h-4 w-4"})]}),e.jsx("p",{children:s.title})]}),l.includes(s.lesson_type)&&e.jsx("span",{children:s.duration})]},s.id)),a.section_quizzes.map(s=>e.jsxs("div",{className:"flex items-center justify-between gap-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"bg-secondary flex h-6 w-6 items-center justify-center rounded-full",children:e.jsx(h,{className:"h-4 w-4"})}),e.jsx("p",{children:s.title})]}),e.jsx("span",{children:s.duration})]},s.id))]}):e.jsx("div",{className:"px-4 py-3 text-center",children:e.jsx("p",{children:i.there_is_no_lesson_added})})})]},a.id))})]})};export{F as default};
