import{_ as w}from"./DclHF4Km.js";import{d as C,j as k,w as v,c as h,b as l,g as o,t as r,u as i,F as y,s as I,o as n,p as M,f as B,q as $,h as F}from"./Cpol3YIt.js";import{u as N}from"./MSXCbCyI.js";import{u as A}from"./ID6IX8kP.js";const E={class:"page-padding lg:max-w-xl"},J={class:"mb-1.5 text-xl font-semibold text-gray-900 xl:text-2xl"},L={class:"space-y-3"},R={class:"overflow-hidden rounded-lg bg-white p-3 shadow-md"},S={class:"text-md font-semibold leading-tight text-gray-900"},V={key:0,class:"mt-0.5 text-sm leading-snug text-gray-600"},G=C({__name:"index",async setup(Z){var d,m;let s,c;const x=k(),u=F(),{data:t,error:a}=([s,c]=v(()=>N(`${u.public.regionModule.apiBaseUrl}/regions/${u.public.regionModule.regionId}/article_collections/${x.params.collectionId}`,{transform(_){return _.article_collection}},"$70JZkyxJ4Z")),s=await s,c(),s);if(a.value)throw a.value.statusCode===404?h({statusCode:404,statusMessage:"Artikelsammlung nicht gefunden",fatal:!0}):h({statusCode:a.value.statusCode,statusMessage:a.value.statusMessage,fatal:!0});return A({title:(d=t.value)==null?void 0:d.parent.name,description:((m=t.value)==null?void 0:m.parent.subtitle)||null}),(_,j)=>{var p,g;const b=w;return n(),l("div",E,[o("h1",J,r((p=i(t))==null?void 0:p.parent.name),1),o("div",L,[(n(!0),l(y,null,I((g=i(t))==null?void 0:g.articles,e=>{var f;return n(),M(b,{key:e.id,"prefetch-on":"interaction",to:{name:"artikel-collectionId-articleId",params:{collectionId:(f=i(t))==null?void 0:f.slug,articleId:e.slug}},class:"block w-full"},{default:B(()=>[o("div",R,[o("h2",S,r(e.title),1),e.subtitle?(n(),l("p",V,r(e.subtitle),1)):$("",!0)])]),_:2},1032,["to"])}),128))])])}}});export{G as default};