1import{t as e}from"./jsx-runtime-Dr5jUjp3.js";import{V as t,j as n}from"./chunk-EVOBXE3Y-DIB08ZUm.js";import{t as r}from"./Link-blQerR_U.js";import{t as i}from"./pathnames-BUDlgVtW.js";import{_ as a,d as o,s,u as c}from"./page-meta-CymaogJx.js";import{t as l}from"./Breadcrumb-CjPxHL_B.js";import{t as u}from"./blog-B0p7KTHt.js";var d=e();function f({currentPage:e,totalPages:t,buildHref:n,ariaLabel:i}){if(t<=1)return null;let a=p(e,t),o=e>1?e-1:null,s=e<t?e+1:null;return(0,d.jsxs)(`nav`,{className:`blog-pagination`,"aria-label":i??`Pagination`,children:[o?(0,d.jsx)(r,{to:n(o),className:`blog-pagination__nav`,rel:`prev`,children:`â Sebelumnya`}):(0,d.jsx)(`span`,{className:`blog-pagination__nav blog-pagination__nav--disabled`,"aria-disabled":`true`,children:`â Sebelumnya`}),(0,d.jsx)(`ul`,{className:`blog-pagination__pages`,children:a.map((t,i)=>t===`â¦`?(0,d.jsx)(`li`,{className:`blog-pagination__gap`,"aria-hidden":`true`,children:`â¦`},`gap-${i}`):(0,d.jsx)(`li`,{children:t===e?(0,d.jsx)(`span`,{className:`blog-pagination__page blog-pagination__page--current`,"aria-current":`page`,children:t}):(0,d.jsx)(r,{to:n(t),className:`blog-pagination__page`,children:t})},t))}),s?(0,d.jsx)(r,{to:n(s),className:`blog-pagination__nav`,rel:`next`,children:`Selanjutnya â`}):(0,d.jsx)(`span`,{className:`blog-pagination__nav blog-pagination__nav--disabled`,"aria-disabled":`true`,children:`Selanjutnya â`})]})}function p(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t+1);let n=[1],r=Math.max(2,e-1),i=Math.min(t-1,e+1);r>2&&n.push(`â¦`);for(let e=r;e<=i;e++)n.push(e);return i<t-1&&n.push(`â¦`),n.push(t),n}var m=({data:e})=>{let t=e?.page??1,n=t>1?`/blog?page=${t}`:`/blog`,r=t>1?` · Halaman ${t}`:``,i={...s.blog,title:`${s.blog.title}${r}`};return[...o(i,n,!0),a(i,n,`CollectionPage`),c([{name:`Home`,path:`/`},{name:`Blog`,path:`/blog`}])]},h=t(function(){let{posts:e,page:t,totalPage:r,category:a}=n(),o=e[0],s=e.slice(1);return(0,d.jsxs)(`main`,{className:`lp-page blog-page`,children:[(0,d.jsx)(`header`,{className:`blog-hero`,children:(0,d.jsxs)(`div`,{className:`blog-hero__inner`,children:[(0,d.jsx)(l,{className:`blog-hero__breadcrumb`,items:[{label:`Home`,to:i.HOME},{label:`Blog`}]}),(0,d.jsx)(`h1`,{className:`blog-hero__title`,children:`Wawasan kesehatan berbasis bukti, dari dokter Sirka.`}),(0,d.jsx)(`p`,{className:`blog-hero__subtitle`,children:`Artikel seputar metabolisme, hormon, nutrisi, longevitas, dan kesehatan holistik, ditinjau langsung oleh tim medis Sirka.`})]})}),(0,d.jsx)(`section`,{className:`blog-list`,children:e.length===0?(0,d.jsx)(g,{}):(0,d.jsxs)(d.Fragment,{children:[o&&t===1&&!a&&(0,d.jsx)(u,{post:o,featured:!0}),(0,d.jsx)(`ul`,{className:`blog-grid`,children:(t===1&&!a?s:e).map(e=>(0,d.jsx)(`li`,{children:(0,d.jsx)(u,{post:e})},e.id))}),(0,d.jsx)(f,{currentPage:t,totalPages:r,buildHref:e=>{let t=new URLSearchParams;e>1&&t.set(`page`,String(e)),a&&t.set(`category`,a);let n=t.toString();return n?`/blog?${n}`:`/blog`},ariaLabel:`Halaman artikel blog`})]})})]})});function g(){return(0,d.jsxs)(`div`,{className:`blog-empty`,children:[(0,d.jsx)(`p`,{children:`Belum ada artikel yang cocok.`}),(0,d.jsx)(r,{to:`/blog`,className:`blog-empty__cta`,children:`Kembali ke semua artikel`})]})}export{h as default,m as meta};
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.