import{_ as v}from"./ButtonDefault-CghIUDY0.js";import{_ as g}from"./BasicInput-BYe5b9L8.js";import{m as V}from"./bootstrap-vue-next-3DpAa4tb.js";import{_ as k}from"./ClausesKeeper-DVJgfLR3.js";import{_ as C}from"./BlockBalanceAgreement-2iQbaweR.js";import{c as I,b as a,a as o,w as r,u as w,r as u,f as D,o as b,e as d}from"./index-CipWZKo_.js";import{_ as S}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./component-DWBAga-C.js";import"./IconClose-ChC2G6HM.js";import"./contracts-CILh9uSu.js";const y={async setup(){const i=w(),e=u(!1),n=u({EdeskImagesPreview:null,ShowContractsWithoutOrders:null,CreateInvoicesAutomatically:null,InvoicingPeriod:0}),t=D(()=>i.userInfo?.Params?.Settings);function m(){e.value=!0,i.userPersonalDataSettings({...n.value}).then(()=>{e.value=!1})}return await i.fetchUserData().then(()=>{n.value={...t.value}}),{formData:n,getUserSettings:t,isLoading:e,saveChanges:m}}},P={class:"tw-w-full"},h={class:"container"},N={class:"profile-settings"},U={class:"profile-settings__item"},x={class:"profile-settings__item"},B={class:"profile-settings__item"},A={class:"profile-settings__item"};function E(i,e,n,t,m,O){const _=C,c=k,l=V,f=g,p=v;return b(),I("div",P,[a(_),o("div",h,[e[11]||(e[11]=o("div",{class:"section-header"},[o("h1",{class:"section-title"},"Настройки")],-1)),a(c),o("div",N,[o("div",U,[e[5]||(e[5]=o("div",{class:"profile-settings__title"},"Система поддержки пользователей (Тикеты)",-1)),a(l,{id:"display-thumbnails",name:"display-thumbnails",value:"Yes","unchecked-value":"No",modelValue:t.formData.EdeskImagesPreview,"onUpdate:modelValue":e[0]||(e[0]=s=>t.formData.EdeskImagesPreview=s)},{default:r(()=>e[4]||(e[4]=[d(" Отображать миниатюры изображений ",-1)])),_:1,__:[4]},8,["modelValue"])]),o("div",x,[e[7]||(e[7]=o("div",{class:"profile-settings__title"},"Интерфейс",-1)),a(l,{id:"display-counterparties",name:"display-counterparties",value:"Yes","unchecked-value":"No",modelValue:t.formData.ShowContractsWithoutOrders,"onUpdate:modelValue":e[1]||(e[1]=s=>t.formData.ShowContractsWithoutOrders=s)},{default:r(()=>e[6]||(e[6]=[d(" Отображать договора без услуг ",-1)])),_:1,__:[6]},8,["modelValue"])]),o("div",B,[e[9]||(e[9]=o("div",{class:"profile-settings__title"},"Счета",-1)),a(l,{id:"issue-invoices",name:"issue-invoices",value:"Yes","unchecked-value":"No",modelValue:t.formData.CreateInvoicesAutomatically,"onUpdate:modelValue":e[2]||(e[2]=s=>t.formData.CreateInvoicesAutomatically=s)},{default:r(()=>e[8]||(e[8]=[d(" Выписывать счета автоматически ",-1)])),_:1,__:[8]},8,["modelValue"]),a(f,{label:"Период выписки счетов",name:"billing-period",placeholder:"365",modelValue:t.formData.InvoicingPeriod,"onUpdate:modelValue":e[3]||(e[3]=s=>t.formData.InvoicingPeriod=s),isNumber:!0,vertical:""},null,8,["modelValue"]),e[10]||(e[10]=o("div",{class:"note"},"На какой период выписывать автоматически выставляемые счета на продление (дни 10-9999)",-1))]),o("div",A,[a(p,{onClick:t.saveChanges,"is-loading":t.isLoading,label:"Сохранить изменения"},null,8,["onClick","is-loading"])])])])])}const H=S(y,[["render",E],["__scopeId","data-v-92ce1cec"]]);export{H as default};
