import{u as d,j as e,bb as o,bc as m,F as x,bd as p,b6 as h}from"./vendor-BKmmeuxg.js";import{A as u,a as j,b as f,c as y}from"./accordion-CNBvFN43.js";import{S as g}from"./separator-_3LZ_wAA.js";import"./utils-DxSsnXxD.js";const w=({course:t})=>{const{props:n}=d(),{translate:c}=n,{frontend:i}=c,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(g,{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(j,{value:a.id,className:"overflow-hidden rounded-lg border",children:[e.jsxs(f,{className:"[&[data-state=open]]:!bg-muted px-4 py-3 text-base hover:no-underline",children:[r+1,". ",a.title]}),e.jsx(y,{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{w as default};