1import{r as c,Q as h,l as f,d as n,o as l,a as e,F as v,g as x,n as g,e as p,t as r,f as y,U as k}from"./app-DDSQZi8b.js";const w={key:0,class:"flex items-center justify-center my-6"},C={key:1,class:"p-6 bg-white"},$={key:0,class:"grid grid-cols-1 gap-y-4 sm:grid-cols-2 sm:gap-x-6 sm:gap-y-10 lg:grid-cols-4 lg:gap-x-8"},j={class:"relative"},z=["src","alt"],P={class:"top-0 left-0 right-0 z-20 absolute p-2 flex justify-between pointer-events-none"},B={class:"flex flex-1 flex-col space-y-2 p-4 z-10"},M={class:"text-sm font-medium text-gray-900"},N=["href"],S={class:"mt-2 flex items-center"},V={class:"flex-1 h-2 bg-gray-200 rounded-full overflow-hidden mr-2"},F={class:"text-sm text-gray-500 min-w-[30px] text-right"},L={class:"text-green-schoolism text-sm mt-2"},A={class:"mb-2 h-6"},Z={key:0,class:"bg-green-100 text-green-700 inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset"},D={key:1,class:"text-sm"},Q={__name:"CourseInProgress",setup(E){const o=c([]),a=c(!0),u=h(),m=s=>!u.props.isSubscribed&&s.course_type==="subscription"?`s/free/course/lessons/${s.id}`:s.progress===100?s.course_type==="subscription"?`s/sub/course/lessons/${s.id}`:`s/life/course/lessons/${s.id}`:s.course_type==="subscription"?`s/sub/course/lessons/${s.id}/${s.last_watched_video_id}`:`s/life/course/lessons/${s.id}/${s.last_watched_video_id}`,_=s=>{let t="";switch(s.availability){case"coming soon":t="bg-purple-50 text-purple-700 ring-purple-700/10";break;case"new":t="bg-pink-50 text-pink-700 ring-pink-700/10";break;default:t="bg-green-50 text-green-700";break}return t};f(()=>{b()});const b=async()=>{await axios.get("/api/dashboard/progress").then(s=>{o.value=s.data.inProgress||[],a.value=!1})};return(s,t)=>a.value?(l(),n("div",w,t[0]||(t[0]=[e("div",{class:"h-8 w-8 border-4 border-green-schoolism-500 border-t-transparent rounded-full animate-spin"},null,-1)]))):(l(),n("div",C,[o.value.length>0?(l(),n("div",$,[(l(!0),n(v,null,x(o.value,(i,d)=>(l(),n("div",{class:g([{"hidden lg:block":d>1,block:d<=1},"group relative flex flex-col overflow-hidden rounded-lg border border-gray-200 bg-white"])},[e("div",j,[e("img",{src:i.image_url,alt:i.title,class:"w-full bg-gray-200 object-cover group-hover:opacity-75 sm:aspect-auto"},null,8,z),t[1]||(t[1]=e("div",{class:"absolute inset-0 bg-black/40 flex items-center justify-center z-10 pointer-events-none"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-10 h-10 text-white"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.91 11.672a.375.375 0 0 1 0 .656l-5.603 3.113a.375.375 0 0 1-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112Z"})])],-1))]),e("div",P,[e("div",null,[i.availability!=="available"?(l(),n("span",{key:0,class:g([_(i),"inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset"])},r(i.availability),3)):p("",!0)])]),e("div",B,[e("h3",M,[e("a",{href:m(i)},[t[2]||(t[2]=e("span",{"aria-hidden":"true",class:"absolute inset-0"},null,-1)),y(" "+r(i.title),1)],8,N)]),e("div",S,[e("div",V,[e("div",{class:"h-2 bg-green-schoolism rounded-full transition-all duration-300",style:k({width:i.progress+"%"})},null,4)]),e("span",F,r(i.progress)+"% ",1)]),e("p",L,r(i.course_type=="subscription"?"My Subscription":"Lifetime"),1),e("div",A,[i.is_free?(l(),n("span",Z," Free ")):p("",!0)])])],2))),256))])):(l(),n("div",D," None Available "))]))}};export{Q 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.