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