import{o as s,c as a,bJ as m,d as _,q as v,Y as x,b as g,a as o,t as f,l,F as b,p as k,n as M,h as i,j as z,w as h,d6 as V,i as L,N,v as $,Q as B}from"./Co0rzPff.js";import{a as A}from"./BNIq7RTg.js";import{_ as C}from"./BXV9WDHh.js";const j={xmlns:"http://www.w3.org/2000/svg","fill-rule":"evenodd","stroke-linejoin":"round","stroke-miterlimit":"2","clip-rule":"evenodd",viewBox:"0 0 2084 2084"};function T(d,e){return s(),a("svg",j,e[0]||(e[0]=[m('',1)]))}const Y={render:T},D={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12.7 12.7"};function S(d,e){return s(),a("svg",D,e[0]||(e[0]=[m('',13)]))}const Z={render:S},F={class:"mx-2 p-4 !py-8 sm:mx-8 sm:p-32"},I={class:"my-8 flex items-center justify-between"},P={class:"m-0 mx-auto text-3xl font-extrabold sm:text-4xl"},q={key:0,class:"grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))] gap-4"},E={class:"mx-2 my-8 flex w-full items-center justify-center"},G=_({__name:"LatestNewsRow",setup(d){const{formatMessage:e}=v(),w=x(A.map(t=>({...t,path:`/news/article/${t.slug}/`,thumbnail:t.thumbnail?`/news/article/${t.slug}/thumbnail.webp`:"/news/default.webp",title:t.title,summary:t.summary,date:t.date})).sort((t,c)=>new Date(c.date).getTime()-new Date(t.date).getTime())),n=$({latestNews:{id:"ui.latest-news-row.latest-news",defaultMessage:"Latest news from Modrinth"},viewAll:{id:"ui.latest-news-row.view-all",defaultMessage:"View all news"}}),r=g(()=>w.value.slice(0,3));return(t,c)=>{const u=B;return s(),a("div",F,[o("div",I,[o("h2",P,f(l(e)(l(n).latestNews)),1)]),r.value?(s(),a("div",q,[(s(!0),a(b,null,k(r.value,(p,y)=>(s(),a("div",{key:p.slug,class:M({"max-xl:hidden":y===2})},[i(l(C),{article:p},null,8,["article"])],2))),128))])):z("",!0),o("div",E,[i(l(N),{color:"brand",size:"large"},{default:h(()=>[i(u,{to:"/news"},{default:h(()=>[i(l(V)),L(" "+f(l(e)(l(n).viewAll)),1)]),_:1})]),_:1})])])}}});export{Y as A,Z as P,G as _};