import{_ as B}from"./EmptyStateBlock-Dt7jmbAi.js";import{a as b}from"./bootstrap-vue-next-C0pyDr3k.js";import{_ as h}from"./HtmlContent-DrkJBX3e.js";import{_ as D}from"./BlockBalanceAgreement-396E9Da8.js";import{u as N}from"./content-Be03vzee.js";import{f as P}from"./time-CsiTV-I2.js";import{r as V,x as C,g as w,o as e,c as a,b as n,a as r,F as c,h as S,m as E,d as I,w as A,f as L,t as d,B as T}from"./index-Bb2UEb_P.js";import"./index-Dax_IkAt.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ButtonDefault-CzWpVlv6.js";import"./common-U_VzDrmL.js";const $={class:"tw-px-4 md:tw-px-8 tw-mb-8"},F={class:"tw-mt-4 tw-space-y-8"},R={class:"tw-text-gray-500 tw-text-sm tw-mt-2"},m=8,W={__name:"News",async setup(j){let u,_;const i=N(),o=V(1);[u,_]=C(()=>i.fetchNews()),await u,_();const l=w(()=>Object.values(i.news).filter(p=>p.IsPublish).reverse()),f=w(()=>l.value?.slice((o.value-1)*m,o.value*m));return(p,s)=>{const x=D,v=I("RouterLink"),g=h,k=b,y=B;return e(),a(c,null,[n(x),r("div",$,[s[1]||(s[1]=r("h1",{class:"tw-text-xl sm:tw-text-4xl tw-mt-4"},"Новости",-1)),l.value.length?(e(),a(c,{key:0},[r("div",F,[(e(!0),a(c,null,S(f.value,t=>(e(),a("div",{key:t.ID},[n(v,{class:"tw-text-2xl",to:`/News/${t.ID}`},{default:A(()=>[L(d(t.Title),1)]),_:2},1032,["to"]),r("div",R,d(T(P)(t.PublicDate)),1),n(g,{content:t.Text,class:"tw-mt-2"},null,8,["content"])]))),128))]),n(k,{modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=t=>o.value=t),"total-rows":l.value.length,"per-page":m,"first-number":"","last-number":"",class:"tw-w-full tw-mt-10"},null,8,["modelValue","total-rows"])],64)):(e(),E(y,{key:1,label:"Пока что нет добавленных новостей",class:"tw-mt-4"}))])],64)}}};export{W as default};
