1import{u as L,_ as E,C as F}from"./CourseGrid-C0JsdBde.js";import{ec as V,dc as R,aq as C,dn as A,dB as S,z as I,r as _,d as x,dC as B,a as M,b as N,e as y,f as a,b6 as P,v as T}from"./index-DcSVvNrM.js";import{u as U}from"./useCoursesSeo-CaVSpD9A.js";import{S as b}from"./school.injections-D9uAkOkG.js";import{u as k}from"./useLocale-BECgx5XS.js";import"./FilterField.vue_vue_type_script_setup_true_lang-By_stLER.js";import"./CourseItem.vue_vue_type_style_index_0_lang-Cuth7S2B.js";async function D(c){const o=V(),{setCoursesPageProperties:f}=U(),{t:m}=k(),r=20,v="recommended",{filterValues:l,filters:p}=L({sorting:v,periods:[]}),e=_([]),s=_(!1),i=_(!1),u=R(b),n="vc.ru";async function t(){var d,g;s.value=!0,e.value=[];const h=await o.getSchoolCourses({slug:c.value,limit:r,isResetPagination:!0,filters:l.value});S(e.value,h.courses),i.value=e.value.length<r,s.value=!1,I(u==null?void 0:u.value)&&f({title:m("courses.school.seo.courses.title",{school:(d=u.value)==null?void 0:d.title,site:n}),meta:{description:m("courses.school.seo.courses.description",{school:(g=u.value)==null?void 0:g.title,site:n})}})}async function w(){const h=e.value.length;s.value=!0;const d=await o.getSchoolCourses({slug:c.value,limit:r,filters:l.value});s.value=!1,i.value=h+r>d.courses.length,S(e.value,d.courses)}return C(c,async()=>{await t()}),C(l,async()=>{await t()},{deep:!0}),await A({onServer:t,onHydration:t,onAfterClientRender:async()=>{e.value.length===0&&await t()}}),{courseList:e,loadMoreCourses:w,isFeedLoading:s,isFeedEnded:i,filterValues:l,filters:p}}const G={class:"courses-school-courses"},J=x({__name:"SchoolCourses",props:{slug:{},sorting:{}},async setup(c){let o,f;const m=c,r=T(()=>m.slug),{courseList:v,loadMoreCourses:l,isFeedLoading:p,isFeedEnded:e,filterValues:s,filters:i}=([o,f]=B(()=>D(r)),o=await o,f(),o);return(u,n)=>(M(),N("div",G,[y(a(E),{modelValue:a(s),"onUpdate:modelValue":n[0]||(n[0]=t=>P(s)?s.value=t:null),class:"courses-school-courses__filters",filters:a(i)},null,8,["modelValue","filters"]),y(F,{class:"courses-school-courses__feed",items:a(v),"load-more":a(l),"is-loading":a(p),"is-ended":a(e)},null,8,["items","load-more","is-loading","is-ended"])]))}});export{J 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.