import"../chunks/disclose-version.Bg9kRutz.js";import{e as B,i as e,r,s as o,t as p,g as D,f as L,T as U,n as j}from"../chunks/runtime.Timy72i3.js";import{s as N}from"../chunks/render.BgGXR1Qj.js";import{i as y}from"../chunks/if.CVlJASM3.js";import{a as v,t as d,e as k}from"../chunks/template.yWk7hgrK.js";import{s as f,a as z}from"../chunks/attributes.DLwrJmCH.js";import{e as E,i as H}from"../chunks/each.C6Vczh1y.js";import{f as I}from"../chunks/dates.DNWkk-Jp.js";var O=d('<div class="container svelte-1b65ii3"><div class="image-item svelte-1b65ii3"><a class="svelte-1b65ii3"><img class="svelte-1b65ii3"></a></div> <div class="text-item svelte-1b65ii3"><h3 style="margin-top: 0px; margin-bottom: 10px" class="svelte-1b65ii3"><a class="svelte-1b65ii3"> </a></h3> <div class="red-line svelte-1b65ii3"></div> <p style="margin-top: 0px; margin-bottom: 0px;"><span class="category svelte-1b65ii3"><a class="svelte-1b65ii3"> </a></span> <span class="date svelte-1b65ii3"> </span></p></div></div>');function S(P,a){B(a,!0);var c=O(),m=e(c),_=e(m),h=e(_);r(_),r(m);var l=o(m,2),n=e(l),g=e(n),b=e(g);r(g),r(n);var u=o(n,4),x=e(u),C=e(x);p(()=>f(C,"href",`/blog/${a.post.categories[0].toLowerCase()??""}`));var i=e(C);r(C),r(x);var t=o(x,2),s=e(t);p(()=>N(s,`- ${I(a.post.date)??""}`)),r(t),r(u),r(l),r(c),p(()=>{f(_,"href",`/posts/${a.post.slug??""}`),f(h,"src",a.post.thumbnail),f(h,"alt",`Post thumbnail for blog post ${a.post.title??""}`),f(g,"href",`/posts/${a.post.slug??""}`),N(b,`${(a.post.published?"":"(UNPUBLISHED) ")??""}${a.post.title??""}`),N(i,a.post.categories[0])}),v(P,c),D()}var T=d('<p><a href="/blog">Return to blog</a></p>'),q=d("<h2>Oops!</h2> <p>No posts were found under this category.</p> <!>",1),A=d('<p style="text-align: center; margin: 30px 0px 30px 0px"><a>↻ Return to first page</a></p>'),F=d("<p><a>Previous page</a></p>"),G=d("<p><a>Next page</a></p>"),J=d('<!> <!> <div class="page-container svelte-vpdhr2"><div class="button-container svelte-vpdhr2" style="text-align: left"><!></div> <div class="button-container svelte-vpdhr2" style="text-align: center"><p> </p></div> <div class="button-container svelte-vpdhr2" style="text-align: right"><!></div></div>',1);function K(P,a){B(a,!0);var c=J(),m=L(c);y(m,()=>a.posts&&a.posts.length,i=>{var t=k(),s=L(t);E(s,17,()=>a.posts,H,(R,w)=>{S(R,{get post(){return U(w)}})}),v(i,t)},i=>{var t=q(),s=o(L(t),4);y(s,()=>a.category==="all",R=>{var w=T();v(R,w)}),v(i,t)});var _=o(m,2);y(_,()=>a.page===a.total&&a.page>2,i=>{var t=A(),s=e(t);r(t),p(()=>f(s,"href",`/blog/${a.category??""}`)),v(i,t)});var h=o(_,2),l=e(h),n=e(l);y(n,()=>a.page>1,i=>{var t=F(),s=e(t);r(t),p(()=>f(s,"href",`/blog/${a.category??""}/${a.page-1}`)),v(i,t)}),r(l);var g=o(l,2),b=e(g),u=e(b);r(b),r(g);var x=o(g,2),C=e(x);y(C,()=>a.page<a.total,i=>{var t=G(),s=e(t);r(t),p(()=>f(s,"href",`/blog/${a.category??""}/${a.page+1}`)),v(i,t)}),r(x),r(h),p(()=>N(u,`Page ${a.page??""} of ${a.total??""}`)),v(P,c),D()}var M=d("<h1>Blog</h1>"),Q=d('<h1>Category: <span class="category svelte-17jfze0"> </span></h1> <p style="text-align: left; margin: 30px 0px 30px 0px"><a href="/blog">↻ Return to main blog</a></p>',1),V=d("<!> <!> <!>",1);function ra(P,a){B(a,!0);var c=V(),m=L(c);y(m,()=>a.data.category==="all",l=>{var n=M();v(l,n)},l=>{var n=Q(),g=L(n),b=o(e(g)),u=e(b);r(b),r(g),j(2),p(()=>N(u,a.data.category)),v(l,n)});var _=o(m,2);z(_,()=>a.children);var h=o(_,2);K(h,{get posts(){return a.data.posts},get page(){return a.data.page},get total(){return a.data.total},get category(){return a.data.category}}),v(P,c),D()}export{ra as component};