import{aT as i,j as e}from"./react-vendor-xYZnmIII.js";import{a as r,c as a}from"./ui-components-CQM92IK3.js";import{V as c}from"./video-player-C1vwhm7_.js";import{P as n}from"./richtor-BECSBxkh.js";import m from"./document-viewer-BIx4pvTR.js";import p from"./embed-viewer-CMnC--S4.js";import d from"./lesson-control-_xSFWiJg.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";const g=({lesson:s})=>{const{props:o}=i(),{translate:t}=o,{frontend:l}=t;return s?e.jsxs(r,{className:a("group lesson-container relative"),children:[e.jsx(d,{className:"opacity-0 transition-all duration-300 group-hover:opacity-100"}),["video_url","video"].includes(s.lesson_type)&&e.jsx(c,{source:{type:"video",sources:[{src:s.lesson_src||"",type:"video/mp4"}]}}),s.lesson_type==="document"&&e.jsx(m,{src:s.lesson_src||""}),s.lesson_type==="embed"&&e.jsx(p,{src:s.lesson_src||""}),s.lesson_type==="text"&&e.jsx("div",{className:"h-full w-full overflow-y-auto",children:e.jsx(n,{value:s.lesson_src||""})}),s.lesson_type==="image"&&e.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-y-auto",children:e.jsx("img",{className:"h-full max-h-[calc(100vh-60px)] min-h-[80vh]",src:s.lesson_src})})]}):e.jsx(r,{className:"min-h-[60vh] w-full overflow-hidden rounded-lg",children:e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("p",{children:l.no_lesson_found})})})};export{g as default};
