1import{j as s,cl as p,dx as N,aW as y,ar as C,b5 as n,as as c,B as j,s as m,A as k,C as o,l as x,d8 as L,a7 as _,bI as P}from"./bootstrap-CRBTy1DZ.js";import{u as A,A as h}from"./useLessonProgress-R5yO7MNd.js";import{u as B}from"./useCourseLessons-DygfW_Et.js";import{u as I}from"./useCourses-CeygO3jB.js";import"./index-Bg6ziU2z.js";function $({completed:t,total:l,percentage:a,showDetails:r=!0}){return s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsxs("div",{className:"flex items-center gap-2",children:[a===100?s.jsx(p,{className:"h-5 w-5 text-green-500"}):s.jsx(N,{className:"h-5 w-5 text-muted-foreground"}),s.jsxs("span",{className:"font-medium",children:["××תק×××ת ש××: ",t,"/",l," ש××¢×ר×× (",a,"%)"]})]})}),s.jsx(y,{value:a,className:"h-3"}),r&&a===100&&s.jsx("p",{className:"text-sm text-green-600 font-medium",children:"ð ××× ×××! ס×××ת ×ת ××§×רס!"})]})}function S(){const{courseId:t}=C(),{courses:l,isLoading:a}=I(),{lessons:r,isLoading:g}=B(t,!0),{isLessonCompleted:f,getCourseProgress:b}=A(),i=l.find(e=>e.id===t),v=r.map(e=>e.id),d=b(v);return a||g?s.jsx(h,{children:s.jsx(n,{children:s.jsxs("div",{className:"container mx-auto py-8 px-4",dir:"rtl",children:[s.jsx(c,{className:"h-8 w-48 mb-4"}),s.jsx(c,{className:"h-4 w-96 mb-8"}),s.jsx(c,{className:"h-24 w-full mb-4"}),s.jsx("div",{className:"space-y-3",children:[1,2,3,4].map(e=>s.jsx(c,{className:"h-20 w-full"},e))})]})})}):!i||!i.is_published?s.jsx(h,{children:s.jsx(n,{children:s.jsxs("div",{className:"container mx-auto py-8 px-4 text-center",dir:"rtl",children:[s.jsx("h1",{className:"text-2xl font-bold mb-4",children:"××§×רס ×× × ×צ×"}),s.jsx(j,{asChild:!0,children:s.jsx(m,{to:"/academy",children:"×××¨× ××§×רס××"})})]})})}):s.jsx(h,{children:s.jsx(n,{children:s.jsxs("div",{className:"container mx-auto py-8 px-4",dir:"rtl",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx(j,{variant:"ghost",asChild:!0,className:"mb-4",children:s.jsxs(m,{to:"/academy",children:[s.jsx(k,{className:"h-4 w-4 ml-2"}),"×××¨× ××§×רס××"]})}),s.jsx("h1",{className:"text-3xl font-bold mb-2",children:i.title}),i.description&&s.jsx("p",{className:"text-muted-foreground",children:i.description})]}),s.jsx(o,{className:"mb-8",children:s.jsx(x,{className:"pt-6",children:s.jsx($,{completed:d.completed,total:d.total,percentage:d.percentage})})}),s.jsx("div",{className:"space-y-3",children:r.length===0?s.jsx(o,{children:s.jsxs(x,{className:"py-12 text-center",children:[s.jsx(L,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),s.jsx("p",{className:"text-muted-foreground",children:"××× ×©××¢×ר×× ××§×רס ×× ×¢××××"})]})}):r.map((e,w)=>{const u=f(e.id);return s.jsx(m,{to:`/academy/${t}/${e.id}`,className:"block",children:s.jsx(o,{className:`hover:shadow-md transition-shadow ${u?"bg-green-50 dark:bg-green-950/20":""}`,children:s.jsx(x,{className:"py-4",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"flex-shrink-0",children:u?s.jsx(p,{className:"h-6 w-6 text-green-500"}):s.jsx(N,{className:"h-6 w-6 text-muted-foreground"})}),e.youtube_video_id&&s.jsx("div",{className:"flex-shrink-0 hidden sm:block",children:s.jsx("img",{src:`https://img.youtube.com/vi/${e.youtube_video_id}/mqdefault.jpg`,alt:e.title,className:"w-24 h-14 object-cover rounded"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsxs("span",{className:"text-sm text-muted-foreground",children:["ש××¢×ר ",w+1,":"]}),s.jsx("h3",{className:"font-medium truncate",children:e.title})]}),e.description&&s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-1",children:e.description})]}),s.jsxs("div",{className:"flex items-center gap-4 flex-shrink-0",children:[e.duration_minutes&&s.jsxs("span",{className:"text-sm text-muted-foreground flex items-center gap-1",children:[s.jsx(_,{className:"h-4 w-4"}),e.duration_minutes," ×ק׳"]}),s.jsx(P,{className:"h-8 w-8 text-primary"})]})]})})})},e.id)})})]})})})}export{S as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.