1import{d as C,ab as D,o as t,c as i,w as a,x,v as n,I as l,G as o,H as c,C as B,u as r,ag as I,J as y,e as m,aq as N}from"./Cthoq7bl.js";import{_ as $}from"./DOkXwtW3.js";const j={class:"flex items-start justify-between gap-2"},V={class:"flex items-center gap-3 min-w-0"},A={class:"font-semibold text-base leading-tight"},L={key:0,class:"flex items-stretch gap-3"},T={key:0,class:"text-sm text-muted line-clamp-3 w-1/2"},U={key:1,class:"relative w-1/2 min-h-24 rounded overflow-hidden bg-white"},q=["src"],H={class:"flex items-center justify-between gap-2"},K={class:"flex items-center gap-2 text-sm text-muted"},z={key:0},E={key:1},G={key:2},J=C({__name:"CoursetypeCard",props:{title:{},description:{},slug:{},to:{},icon:{},coverImage:{},level:{}},setup(e){const f=e,{data:k,status:h}=D(`coursetype-${f.slug}`,()=>$fetch("/api/courses",{query:{slug:f.slug}}),{server:!1,lazy:!0,default:()=>({courses:[]}),getCachedData:()=>{}}),_=m(()=>h.value==="pending"||h.value==="idle"),u=m(()=>k.value?.courses?.[0]);function p(s){return s?new Date(s).toLocaleDateString("de-CH",{weekday:"short",year:"numeric",month:"short",day:"numeric"}):""}const d=m(()=>{if(_.value)return null;const s=u.value;return s?s.is_confirmed?{label:"Bestätigt",color:"success"}:null:{label:"Auf Anfrage",color:"neutral"}});return(s,O)=>{const g=B,v=I,b=$,w=N;return t(),i(w,{to:e.to,class:"group block h-full"},{default:a(()=>[x(b,{class:"h-full flex flex-col transition-shadow group-hover:ring-2 group-hover:ring-primary"},{header:a(()=>[c("div",j,[c("div",V,[e.icon?(t(),i(g,{key:0,name:e.icon,class:"text-primary text-xl shrink-0"},null,8,["name"])):o("",!0),c("h3",A,l(e.title),1)]),e.level?(t(),i(v,{key:0,color:"success",variant:"subtle",class:"shrink-0"},{default:a(()=>[y(l(e.level),1)]),_:1})):o("",!0)])]),footer:a(()=>[c("div",H,[c("div",K,[x(g,{name:"i-lucide-calendar",class:"shrink-0"}
1),r(_)?(t(),n("span",z,"Termine werden geladen â¦")):r(u)?(t(),n("span",E," Nächster Kurs: "+l(p(r(u).startdate)),1)):(t(),n("span",G,"Kein Termin ausgeschrieben"))]),r(d)?(t(),i(v,{key:0,color:r(d).color,variant:"subtle",class:"shrink-0"},{default:a(()=>[y(l(r(d).label),1)]),_:1},8,["color"])):o("",!0)])]),default:a(()=>[e.description||e.coverImage?(t(),n("div",L,[e.description?(t(),n("p",T,l(e.description),1)):o("",!0),e.coverImage?(t(),n("div",U,[c("img",{src:e.coverImage,alt:"",class:"absolute inset-0 w-full h-full object-cover"},null,8,q)])):o("",!0)])):o("",!0)]),_:1})]),_:1},8,["to"])}}}),M=Object.assign(J,{__name:"CoursetypeCard"});export{M as _}; 2//# sourceMappingURL=_yrTriJ2.js.map
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.