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