import{aT as p,j as e,cJ as m,cD as x,cE as u,b3 as f,cF as h,cA as j}from"./react-vendor-xYZnmIII.js";import{J as g,K as v,M as y,E as N,F as b,G as w,H as _}from"./ui-components-CQM92IK3.js";import{V as T}from"./video-player-C1vwhm7_.js";import{g as C,S as z}from"./section-BOHF3o7C.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";import"./use-lang-Dg6I_Fym.js";import"./chunked-uploader-input-dQEAsxxf.js";import"./input-error-_LAmvivg.js";import"./loading-button-D7aXR3K4.js";import"./inertia-FIn3q7f1.js";import"./icon-picker-dialog-jzY0-ZNJ.js";import"./icon-picker-e9MMAA5U.js";import"./debounce-CWHP_ANh.js";import"./icon-picker-tooltip-CR2ZyXZ1.js";import"./table-header-CjMHr8CW.js";import"./table-page-size-CzF8rJAG.js";import"./route-D0xh7FtZ.js";const U=()=>{var i;const{props:l}=p(),{page:o,topCourse:t,customize:n}=l,c=C(o,"top_course"),r=["video","video_url"];return e.jsx("div",{className:"overflow-y-hidden",children:e.jsxs(z,{customize:n,pageSection:c,containerClass:"py-20 relative",children:[t?e.jsxs("div",{className:"mx-auto w-full max-w-[960px]",children:[e.jsxs("div",{className:"relative mb-10",children:[e.jsx("img",{className:"relative z-10 w-full rounded-3xl md:rounded-4xl",src:(i=t.thumbnail)!=null?i:"/assets/images/blank-image.jpg",alt:""}),t.preview&&e.jsxs(g,{children:[e.jsx(v,{asChild:!0,children:e.jsx("button",{className:"absolute top-1/2 left-1/2 z-20 -translate-x-1/2 -translate-y-1/2 cursor-pointer rounded-full bg-black/70 p-4 transition-transform hover:scale-110",children:e.jsx(m,{className:"h-6 w-6 text-white"})})}),e.jsx(y,{className:"overflow-hidden p-0 md:min-w-3xl",children:e.jsx(T,{source:{type:"video",sources:[{src:t.preview,type:"video/mp4"}]}})})]})]}),e.jsx("h6",{className:"relative z-10 py-5 text-2xl font-bold md:text-[28px]",children:t.title}),e.jsx(N,{type:"single",collapsible:!0,className:"relative z-10 space-y-4",defaultValue:t.sections.length>0?t.sections[0].id:"",children:t.sections.map((a,d)=>e.jsxs(b,{value:a.id,className:"overflow-hidden rounded-lg border",children:[e.jsxs(w,{className:"[&[data-state=open]]:!bg-muted cursor-pointer px-4 py-3 text-base hover:no-underline",children:["Module ",d+1,": ",a.title]}),e.jsx(_,{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:[r.includes(s.lesson_type)&&e.jsx(x,{className:"h-4 w-4"}),["document","iframe"].includes(s.lesson_type)&&e.jsx(u,{className:"h-4 w-4"}),s.lesson_type==="text"&&e.jsx(f,{className:"h-4 w-4"}),s.lesson_type==="image"&&e.jsx(h,{className:"h-4 w-4"})]}),e.jsx("p",{children:s.title})]}),r.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(j,{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:"There is no lesson added"})})})]},a.id))})]}):e.jsx("div",{className:"relative z-10 mx-auto w-full max-w-[960px] space-y-4",children:e.jsx("p",{className:"text-center text-lg font-medium",children:"Top Course Sections. There is no course added."})}),e.jsx("div",{className:"after:pointer-events-none after:absolute after:top-[50%] after:left-0 after:h-[240px] after:w-[240px] after:rounded-full after:bg-[rgba(97,95,255,1)] after:blur-[310px] after:content-['']"}),e.jsx("div",{className:"after:pointer-events-none after:absolute after:top-[40%] after:right-0 after:h-[240px] after:w-[240px] after:rounded-full after:bg-[rgba(0,167,111,1)] after:blur-[240px] after:content-['']"})]})})};export{U as default};
