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