import{_ as B}from"./EmptyStateBlock-Dt7jmbAi.js";import{_ as V}from"./BlueButton.vue_vue_type_script_setup_true_lang-CY8chwQm.js";import{_ as y}from"./SimpleCheckbox-DxdM8U6J.js";import{_ as S}from"./ClausesKeeper-CyJ_9bTp.js";import{_ as b}from"./BlockBalanceAgreement-396E9Da8.js";import{r as p,g as I,o as n,c as m,b as o,a as l,w as _,B as D,i as $,F as d,m as L,j as N,d as U,f,t as E}from"./index-Bb2UEb_P.js";import{u as R}from"./index-Dax_IkAt.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./HtmlContent-DrkJBX3e.js";import"./IconCloseCircle-ctElXVvc.js";import"./clauses-Bhz_DuFa.js";import"./ButtonDefault-CzWpVlv6.js";import"./common-U_VzDrmL.js";const F={class:"tw-px-4 md:tw-px-8"},T={key:0,class:"tw-text-sm tw-text-gray-500 tw-mt-2"},j={class:"form tw-mt-4"},h={__name:"ContractSettings",setup(A){const u=R(),c=N(),r=p(!1),e=I(()=>u.contractsList?.[c.params.id]),a=p(e.value?.IsUponConsider?1:0);async function v(){e.value?.ID&&(r.value=!0,await u.contractEdit({ContractID:e.value?.ID,IsUponConsider:a.value}),r.value=!1)}return(K,t)=>{const w=b,x=U("RouterLink"),g=S,i=y,k=V,C=B;return n(),m(d,null,[o(w,{"contract-id":e.value?.ID},null,8,["contract-id"]),l("div",F,[t[5]||(t[5]=l("h1",{class:"tw-text-xl sm:tw-text-4xl"},"Настройки договора",-1)),e.value?(n(),m("div",T,[o(x,{to:`/ContractScheme/${D(c).params.id}`},{default:_(()=>[f(E(e.value.Customer),1)]),_:1},8,["to"])])):$("",!0),o(g),e.value?(n(),m(d,{key:1},[t[4]||(t[4]=l("h2",{class:"tw-text-lg sm:tw-text-2xl tw-mt-4"},"Способ отчетности",-1)),l("div",j,[o(i,{modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=s=>a.value=s),label:"По факту",value:"0"},null,8,["modelValue"]),o(i,{modelValue:a.value,"onUpdate:modelValue":t[1]||(t[1]=s=>a.value=s),label:"Ежемесячно",value:"1"},null,8,["modelValue"]),o(k,{loading:r.value,label:"Сохранить",class:"tw-mt-4",onClick:t[2]||(t[2]=s=>v())},{default:_(()=>t[3]||(t[3]=[f(" Сохранить ",-1)])),_:1,__:[3]},8,["loading"])])],64)):(n(),L(C,{key:2,label:"Договор не найден",class:"tw-mt-4"}))])],64)}}};export{h as default};
