import{l as e,m as n}from"./index-C-gKvEDq.js";const c={getFiscalYears:async a=>{const{data:t}=await e.get(n.FISCAL_YEARS,{params:a});return t.data||t},getFiscalYear:async a=>{const{data:t}=await e.get(n.FISCAL_YEAR_DETAIL(a));return t.data||t},createFiscalYear:async a=>{const{data:t}=await e.post(n.FISCAL_YEARS,a);return t.data},updateFiscalYear:async(a,t)=>{const{data:r}=await e.put(n.FISCAL_YEAR_DETAIL(a),t);return r.data},closeFiscalYear:async a=>{const{data:t}=await e.post(`${n.FISCAL_YEAR_DETAIL(a)}close/`);return t.data},getYearEndPreview:async a=>{const{data:t}=await e.get(n.YEAR_END_PREVIEW(a));return t.data},executeYearEndClose:async(a,t)=>{const{data:r}=await e.post(n.YEAR_END_CLOSE(a),t);return r},getCurrentFiscalYear:async()=>{const{data:a}=await e.get(`${n.FISCAL_YEARS}current/`);return a.data},getEntities:async()=>{const{data:a}=await e.get(n.ENTITIES);return a.data&&Array.isArray(a.data)?{results:a.data,count:a.pagination?.count||a.data.length,next:a.pagination?.next||null,previous:a.pagination?.previous||null}:a}};export{c as f};
