import{_ as x}from"./BlockBalanceAgreement-qtspRQ_B.js";import{u as h}from"./content-CZvpGWUh.js";import{f as u,H as y,D,c as r,b as m,a as o,F as _,i as v,d as g,E as b,o as a,w as k,e as A,t as p}from"./index-CmCGXBst.js";import{_ as C}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./contracts-P7YPBhEI.js";import"./ButtonDefault-BIBStZbJ.js";const T={class:"container"},w={class:"documents-list"},B={__name:"ContentDocuments",async setup(L){let c,i;g();const s=h();u(()=>s.documentsList);const d=u(()=>(Array.isArray(s.documentsList)?s.documentsList:Object.values(s.documentsList)).map(t=>{const n=(e=>e?e.replace(/<[^>]*>/g,""):"")(t.Text);return{id:t.ID,partition:t.Partition,title:t.Title,shortText:n.length>170?n.substring(0,170)+"...":n}}));return y(async()=>{await s.fetchDocuments()}),[c,i]=D(()=>s.fetchDocuments()),await c,i(),(f,t)=>{const l=x,n=b("router-link");return a(),r(_,null,[m(l),o("section",null,[o("div",T,[t[0]||(t[0]=o("div",{class:"section-header"},[o("h1",{class:"section-title"},"Шаблоны документов")],-1)),o("div",w,[(a(!0),r(_,null,v(d.value,e=>(a(),r("div",{class:"documents-list__item",key:e.id},[m(n,{class:"document-item__name",to:`/Documents/${e.partition}`},{default:k(()=>[A(p(e.title),1)]),_:2},1032,["to"]),o("p",null,p(e.shortText),1)]))),128))])])])],64)}}},I=C(B,[["__scopeId","data-v-b6beb3c3"]]);export{I as default};
