2 lines
4.3 KiB
JavaScript
2 lines
4.3 KiB
JavaScript
import{u as d,j as e,bh as p,bb as m,bc as x,F as u,bd as f,b6 as h}from"./vendor-BKmmeuxg.js";import{A as j,a as g,b as v,c as b}from"./accordion-CNBvFN43.js";import{D as y,a as N,b as w}from"./dialog-B2gN9MvT.js";import{V as _}from"./video-player-CikPo1Be.js";import{g as C,S as T}from"./section-Bz0LxI_C.js";import"./utils-DxSsnXxD.js";import"./use-lang-YfV87_zl.js";import"./chunked-uploader-input-D0XPVOTS.js";import"./button-BpNwv2aE.js";import"./index-WW_1X1qx.js";import"./input-DM0goJrn.js";import"./index-D9-QKOod.js";import"./input-error-LaPr_4wd.js";import"./loading-button-BnTVAMJ7.js";import"./label-HmIcv5Yx.js";import"./textarea-CyndvowL.js";import"./inertia-SZXqLvQm.js";import"./card-D9_SJYq6.js";import"./icon-picker-dialog-AqyWbPod.js";import"./icon-picker-iXyBXP6r.js";import"./debounce-CWHP_ANh.js";import"./tooltip-BsX7Z6vz.js";import"./scroll-area-C8HGru-R.js";import"./table-header-DVkEnG6Y.js";import"./table-DWOXv4Pu.js";import"./table-page-size-OCfjNXER.js";import"./dropdown-menu-DO-po5c1.js";import"./route-B4ZMN77y.js";import"./avatar-j28afJTV.js";const te=()=>{const{props:i}=d(),{page:l,topCourse:t,customize:o}=i,n=C(l,"top_course"),a=["video","video_url"];return e.jsx("div",{className:"overflow-y-hidden",children:e.jsxs(T,{customize:o,pageSection:n,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:t.thumbnail??"/assets/images/blank-image.jpg",alt:""}),t.preview&&e.jsxs(y,{children:[e.jsx(N,{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(p,{className:"h-6 w-6 text-white"})})}),e.jsx(w,{className:"overflow-hidden p-0 md:min-w-3xl",children:e.jsx(_,{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(j,{type:"single",collapsible:!0,className:"relative z-10 space-y-4",defaultValue:t.sections.length>0?t.sections[0].id:"",children:t.sections.map((r,c)=>e.jsxs(g,{value:r.id,className:"overflow-hidden rounded-lg border",children:[e.jsxs(v,{className:"[&[data-state=open]]:!bg-muted cursor-pointer px-4 py-3 text-base hover:no-underline",children:["Module ",c+1,": ",r.title]}),e.jsx(b,{className:"space-y-1 p-4",children:r.section_lessons.length>0?e.jsxs(e.Fragment,{children:[r.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:[a.includes(s.lesson_type)&&e.jsx(m,{className:"h-4 w-4"}),["document","iframe"].includes(s.lesson_type)&&e.jsx(x,{className:"h-4 w-4"}),s.lesson_type==="text"&&e.jsx(u,{className:"h-4 w-4"}),s.lesson_type==="image"&&e.jsx(f,{className:"h-4 w-4"})]}),e.jsx("p",{children:s.title})]}),a.includes(s.lesson_type)&&e.jsx("span",{children:s.duration})]},s.id)),r.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:"There is no lesson added"})})})]},r.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{te as default};
|