import{D as e,E as t,On as n,_ as r,b as i,bt as a,g as o,mt as s,o as c,qt as l,tr as u,v as d,y as f}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as p}from"./app-Cy8mmMrT.js";import{t as m}from"./AppLayout-r9U2b6YO.js";import{t as h}from"./calendar-days-s3GhWVmT.js";import{t as g}from"./map-pin-B9eZ2Wq-.js";import{i as _,r as v}from"./format-CuWoExAa.js";import{t as y}from"./video-PqOW0ULZ.js";import{t as b}from"./EmptyState-Ceq4v8mE.js";import{t as x}from"./PageHeader-DGQaldEZ.js";import{t as S}from"./EventDateBlock-B2RjLpBs.js";var C={key:0,class:`grid max-w-4xl gap-8`},w={class:`mb-3 text-sm font-semibold text-muted-foreground`},T={class:`divide-y rounded-lg border bg-card`},E={class:`min-w-0 flex-1`},D={class:`text-[15px] font-semibold group-hover:underline`},O={class:`mt-0.5 text-[13px] text-muted-foreground`},k={key:0,class:`mt-0.5 flex items-center gap-1.5 text-[13px] text-muted-foreground`},A=[`src`],j={key:1,class:`max-w-4xl rounded-lg border border-dashed bg-card`},M={__name:`Index`,props:{events:{type:Object,required:!0}},setup(M){let N=M,P=o(()=>{let e=[];for(let t of N.events.data){let n=new Date(t.starts_at),r=_((n(s(),d(m,{title:`Termine`},{default:l(()=>[e(x,{title:`Termine`,description:`Veranstaltungen, Fortbildungen und Treffen.`}),P.value.length?(s(),i(`div`,C,[(s(!0),i(c,null,a(P.value,o=>(s(),i(`section`,{key:o.label},[r(`h2`,w,u(o.label),1),r(`ul`,T,[(s(!0),i(c,null,a(o.events,a=>(s(),i(`li`,{key:a.id},[e(n(p),{href:`/termine/${a.id}`,class:`group flex items-center gap-4 p-4 transition-colors hover:bg-accent/60`},{default:l(()=>[e(S,{date:a.starts_at,class:`w-14`},null,8,[`date`]),r(`div`,E,[r(`h3`,D,u(a.title),1),r(`p`,O,u(n(v)(a)),1),a.location||a.online_url?(s(),i(`p`,k,[a.location?(s(),d(n(g),{key:0,class:`size-3.5`})):(s(),d(n(y),{key:1,class:`size-3.5`})),t(` `+u(a.location||`Online`),1)])):f(``,!0)]),a.thumb_url?(s(),i(`img`,{key:0,src:a.thumb_url,alt:``,loading:`lazy`,class:`hidden h-16 w-28 shrink-0 rounded-md object-cover sm:block`},null,8,A)):f(``,!0)]),_:2},1032,[`href`])]))),128))])]))),128))])):(s(),i(`div`,j,[e(b,{icon:n(h),title:`Keine anstehenden Termine`,text:`Neue Termine erscheinen hier, sobald sie eingetragen sind.`},null,8,[`icon`])]))]),_:1}))}};export{M as default};