import{_ as w}from"./ButtonDefault-CzWpVlv6.js";import{_ as I}from"./BasicInput-BG-lQkv5.js";import{m as b}from"./bootstrap-vue-next-C0pyDr3k.js";import{_ as k}from"./ClausesKeeper-CyJ_9bTp.js";import{_ as C}from"./BlockBalanceAgreement-396E9Da8.js";import{u as S,r as _,g as y,x,o as P,c as U,b as i,a as t,w as r,f as u}from"./index-Bb2UEb_P.js";import{_ as h}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./component-C-Q4t0gB.js";import"./common-U_VzDrmL.js";import"./HtmlContent-DrkJBX3e.js";import"./IconCloseCircle-ctElXVvc.js";import"./clauses-Bhz_DuFa.js";import"./index-Dax_IkAt.js";const N={class:"tw-w-full"},A={class:"container"},B={class:"profile-settings"},E={class:"profile-settings__item"},D={class:"profile-settings__item"},O={class:"profile-settings__item"},W={class:"profile-settings__item"},Y={__name:"UserSettings",async setup($){let d,m;const l=S(),n=_(!1),s=_({EdeskImagesPreview:null,ShowContractsWithoutOrders:null,CreateInvoicesAutomatically:null,InvoicingPeriod:0}),p=y(()=>l.userInfo?.Params?.Settings);function v(){n.value=!0,l.userPersonalDataSettings({...s.value}).then(()=>{n.value=!1})}return[d,m]=x(()=>l.fetchUserData().then(()=>{s.value={...p.value}})),await d,m(),(K,e)=>{const c=C,f=k,a=b,g=I,V=w;return P(),U("div",N,[i(c),t("div",A,[e[11]||(e[11]=t("div",{class:"section-header"},[t("h1",{class:"section-title"},"Настройки")],-1)),i(f),t("div",B,[t("div",E,[e[5]||(e[5]=t("div",{class:"profile-settings__title"},"Система поддержки пользователей (Тикеты)",-1)),i(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",D,[e[7]||(e[7]=t("div",{class:"profile-settings__title"},"Интерфейс",-1)),i(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)),i(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"]),i(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,[i(V,{onClick:v,"is-loading":n.value,label:"Сохранить изменения"},null,8,["is-loading"])])])])])}}},Z=h(Y,[["__scopeId","data-v-512b5875"]]);export{Z as default};
