import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as x,o as C,a as k,al as B,r as c,am as e,an as r,W as g}from"./index-CipWZKo_.js";const D={},F={fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"};function v(o,n){return C(),x("svg",F,n[0]||(n[0]=[k("path",{d:"m6 9 6 6 6-6",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const L=y(D,[["render",v]]),S=B("contracts",()=>{const o=c(null),n=c(null);let i={headers:{"Content-Type":"multipart/form-data"}};async function u(){let s="error";return await e.post(r.contracts).then(t=>{o.value=t?.data}).catch(()=>{s="error"}),s}async function d(s){await e.post(r.contractDownload,s).then(t=>{t.data?.Status==="Ok"&&(document.location=g+t.data?.Location)}).catch(t=>{console.log(t,"error")})}async function l(){let s="error";return await e.post(r.profiles).then(t=>{n.value=t?.data}).catch(()=>{s="error"}),s}async function p(s){let t={status:"error",data:null};return await e.post(r.profileEdit,{...s}).then(a=>{a?.data?.Exception?(t.status="error",t.data=a?.data):(t.status="success",t.data=a?.data)}).catch(()=>{t.status="error"}),t}async function f(s){let t={status:"error",data:null};return await e.post(r.ContractFundsTransfer,{...s}).then(a=>{a?.data?.Exception?(t.status="error",t.data=a?.data):(t.status="success",t.data=a?.data)}).catch(()=>{t.status="error"}),t}async function h(s){let t={status:"error",data:null};return await e.post(r.profileEdit,s,i).then(a=>{a?.data?.Exception?(t.status="error",t.data=a?.data):(t.status="success",t.data=a?.data)}).catch(()=>{t.status="error"}),t}async function w(s){let t={status:"error",data:null};return await e.post(r.contractMake,{...s}).then(a=>{a?.data?.Exception?(t.status="error",t.data=a?.data):(t.status="success",t.data=a?.data)}).catch(()=>{t.status="error"}),t}async function _(s){return(await e.get(r.DaysCalculate+`?${s}`)).data?.DaysFromBallance}async function m(s){let t={status:"error",data:null};return await e.post(r.contractEdit,{...s}).then(a=>{a?.data?.Exception?(t.status="error",t.data=a?.data):(t.status="success",t.data=a?.data)}).catch(()=>{t.status="error"}),t}async function E(s){let t={status:"error",data:null};return await e.post(r.BooleanEdit,{...s}).then(a=>{a?.data?.Exception?(t.status="error",t.data=a?.data):(t.status="success",t.data=a?.data)}).catch(()=>{t.status="error"}),t}return{contractsList:o,profileList:n,fetchProfiles:l,fetchContracts:u,fetchDaysFromBalance:_,contractMake:w,contractEdit:m,createNewContract:p,createNewContractFormData:h,contractDownload:d,booleanEdit:E,FundsTransfer:f}});export{L as _,S as u};
