import{_ as V}from"./ButtonDefault-BIBStZbJ.js";import{_ as S}from"./SimpleCheckbox-BAAxXipX.js";import{_ as h}from"./ClausesKeeper-CTja-fCz.js";import{_ as x}from"./BlockBalanceAgreement-qtspRQ_B.js";import{r as m,f as B,g as I,D as $,c as w,b as o,a as e,w as d,E as y,F as D,o as U,e as p,t as E}from"./index-CmCGXBst.js";import{u as N}from"./contracts-P7YPBhEI.js";import{_ as A}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./IconClose-B_k4TzXM.js";const F={class:"section"},L={class:"container"},T={class:"section-header"},R={class:"breadcrumb"},j={class:"form"},q={__name:"ContractSettings",async setup(z){let c,i;const a=N(),s=m(2),f=I(),l=m(!1),r=B(()=>a?.contractsList?.[f.params.id]);function v(){l.value=!0,a.contractEdit({ContractID:r.value?.ID,IsUponConsider:s.value}).then(()=>{l.value=!1})}return[c,i]=$(()=>a.fetchContracts().then(()=>{s.value=r.value?.IsUponConsider?1:0})),await c,i(),(g,t)=>{const C=x,u=y("router-link"),b=h,_=S,k=V;return U(),w(D,null,[o(C),e("div",F,[e("div",L,[e("div",T,[e("div",R,[o(u,{to:"/Contracts",class:"section-label"},{default:d(()=>t[3]||(t[3]=[p("Договора /",-1)])),_:1,__:[3]}),o(u,{to:`/ContractScheme/${g.$route.params.id}`,class:"section-label"},{default:d(()=>[p(E(r.value?.Customer),1)]),_:1},8,["to"])]),t[4]||(t[4]=e("h1",{class:"section-title"},"Настройки договора",-1))]),o(b),t[5]||(t[5]=e("div",{class:"section-header small-margin"},[e("h2",{class:"section-block_title"},"Способ отчетности")],-1)),e("div",j,[o(_,{label:"По факту",value:"0",modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=n=>s.value=n)},null,8,["modelValue"]),o(_,{label:"Ежемесечно",value:"1",modelValue:s.value,"onUpdate:modelValue":t[1]||(t[1]=n=>s.value=n)},null,8,["modelValue"]),o(k,{class:"settings-button","is-loading":l.value,label:"Сохранить",onClick:t[2]||(t[2]=n=>v())},null,8,["is-loading"])])])])],64)}}},W=A(q,[["__scopeId","data-v-f6aaf58c"]]);export{W as default};
