import{jsxs as i,Fragment as l,jsx as e}from"react/jsx-runtime";import{j as d,D as p,E as h,F as u,G as f}from"./ui-components-B24mpb8o.js";import{usePage as y}from"@inertiajs/react";import{Video as N,File as g,FileText as x,Image as _,FileQuestion as v}from"lucide-react";import"next-themes";import"sonner";import"react";import"@radix-ui/react-label";import"class-variance-authority";import"@radix-ui/react-checkbox";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";const ee=({course:s})=>{const{props:m}=y(),{translate:n}=m,{frontend:o}=n,a=["video","video_url"];return i(l,{children:[e("h6",{className:"mb-4 text-xl font-semibold",children:o.course_curriculum}),e(d,{className:"my-6"}),e(p,{type:"single",collapsible:!0,className:"space-y-4",defaultValue:s.sections.length>0?s.sections[0].id:"",children:s.sections.map((r,c)=>i(h,{value:r.id,className:"overflow-hidden rounded-lg border",children:[i(u,{className:"[&[data-state=open]]:!bg-muted px-4 py-3 text-base hover:no-underline",children:[c+1,". ",r.title]}),e(f,{className:"space-y-1 p-4",children:r.section_lessons.length>0?i(l,{children:[r.section_lessons.map(t=>i("div",{className:"flex items-center justify-between gap-3 py-2",children:[i("div",{className:"flex items-center gap-2",children:[i("div",{className:"bg-secondary flex h-6 w-6 items-center justify-center rounded-full",children:[a.includes(t.lesson_type)&&e(N,{className:"h-4 w-4"}),["document","iframe"].includes(t.lesson_type)&&e(g,{className:"h-4 w-4"}),t.lesson_type==="text"&&e(x,{className:"h-4 w-4"}),t.lesson_type==="image"&&e(_,{className:"h-4 w-4"})]}),e("p",{children:t.title})]}),a.includes(t.lesson_type)&&e("span",{children:t.duration})]},t.id)),r.section_quizzes.map(t=>i("div",{className:"flex items-center justify-between gap-3 py-2",children:[i("div",{className:"flex items-center gap-2",children:[e("div",{className:"bg-secondary flex h-6 w-6 items-center justify-center rounded-full",children:e(v,{className:"h-4 w-4"})}),e("p",{children:t.title})]}),e("span",{children:t.duration})]},t.id))]}):e("div",{className:"px-4 py-3 text-center",children:e("p",{children:o.there_is_no_lesson_added})})})]},r.id))})]})};export{ee as default};
