import{_ as k}from"./EmptyStateBlock-D6U_EDq6.js";import{a as N}from"./bootstrap-vue-next-3DpAa4tb.js";import{_ as h}from"./BlockBalanceAgreement-2iQbaweR.js";import{u as b}from"./content-DjwNX1Ep.js";import{b as x,s as D}from"./time-DenPiOX5.js";import{_ as P}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as a,b as i,a as s,C as y,F as l,i as T,r as d,f as u,E as B,o as n,h as C,w as V,t as p}from"./index-CipWZKo_.js";import"./contracts-CILh9uSu.js";import"./ButtonDefault-CghIUDY0.js";const L={async setup(){const r=b(),t=d(8),c=d(1),e=u(()=>Object.keys(r?.newsList)?.map(m=>r?.newsList[m])?.reverse()),_=u(()=>e.value?.slice((c.value-1)*t.value,c.value*t.value));return await r.fetchNews(),{perPage:t,currentPage:c,getNews:e,getPaginatedData:_,secondToDate:D,formNormalTextDate:x}}},S={class:"container"},E={class:"news"},I={key:0,class:"news__item"},F={class:"news__item-name"},H={class:"news__item-date"},M=["innerHTML"];function j(r,t,c,e,_,m){const g=h,w=B("router-link"),f=N,v=k;return n(),a(l,null,[i(g),s("section",null,[s("div",S,[t[1]||(t[1]=s("div",{class:"section-header"},[s("h1",{class:"section-title"},"Новости")],-1)),e.getNews&&e.getNews.length>0?(n(),a(l,{key:0},[s("div",E,[(n(!0),a(l,null,T(e.getPaginatedData,o=>(n(),a(l,{key:o.index},[o?.IsPublish?(n(),a("div",I,[i(w,{class:"news__item-link",to:`/News/${o?.ID}`},{default:V(()=>[s("div",F,p(o?.Title),1),s("div",H,p(e.formNormalTextDate(e.secondToDate(o?.PublicDate))),1),s("div",{class:"news__item-text",innerHTML:o?.Text},null,8,M)]),_:2},1032,["to"])])):C("",!0)],64))),128))]),i(f,{modelValue:e.currentPage,"onUpdate:modelValue":t[0]||(t[0]=o=>e.currentPage=o),"total-rows":e.getNews.length,"per-page":e.perPage,"first-number":"","last-number":"",class:"pagination tw-w-full"},null,8,["modelValue","total-rows","per-page"])],64)):(n(),y(v,{key:1,label:"Пока что нет добавленных новостей"}))])])],64)}const R=P(L,[["render",j],["__scopeId","data-v-aea3ee8e"]]);export{R as default};
