import{b as a}from"./chunk-NJAZV3N6.js";import{c as m}from"./chunk-NMAI6SSY.js";import{a as d}from"./chunk-CVN2SFTO.js";import{s as l}from"./chunk-PPSZCPHP.js";import{s as r,t as s,w as u,x as k}from"./chunk-DLQQOPQN.js";import{A as n,a as c,la as C,nd as I,qa as v,va as p}from"./chunk-PGS4AHIT.js";s();C();I();k();var A=(()=>{class i extends d{constructor(e){super(),this.apiService=e}fetchNeighour(e,t,o=!0){return this.apiService.get(r.move[o?"getPreviousNeighbour":"getNextNeighbour"](e,t))}fetch(e){return this.apiService.get(r.move.fetch(e))}saveInvoice(e){return e?this.apiService.put(r.move.putInvoice,c({},e)):n()}fetchDocumentLinks(e){return this.apiService.get(r.move.getDocumentLinks(e))}fetchDocTypeData(e){return this.apiService.get(r.move.docTypeData(e))}fiscalizeInvoice(e,t,o=null){return this.apiService.post(r.move.fiscalize(e,t,o))}deleteInvoice(e){return this.apiService.delete(r.move.delete(e))}checkClosedVatPeriod(e){return this.apiService.post(r.move.checkClosedVatPeriod,{date:e})}recalculateInvoiceItems(e){return this.apiService.post(r.move.recalculateInvoiceItems,e)}getAdvancePayments(e,t,o,g,y){let S={acKey:t,docType:o,date:g,subject:y,vat:"",type:"O",invoiceType:e===m.Wholesale?a.Wholesale:a.ReceivedBills};return this.apiService.post(r.move.getAdvancePaymentLinks,S)}workPlaceInitialTodayExist(e){return this.apiService.get(r.fiscalWorkPlace.workPlaceInitialTodayExist(e))}static{this.\u0275fac=function(t){return new(t||i)(p(u))}}static{this.\u0275prov=v({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();s();var h=class{static produceVatCodeField(f,e){return{id:"vatCode",searchable:!0,lazyLoad:!0,component:l,feature:e,apiRequest:t=>f.get(r.general.vatCodeLookup(t)),valueMapper:t=>t.vatCode,labelMapper:t=>`${t.vatCode} - ${t.vat}%`,modelToOptionMapper:(t,o)=>({vatCode:o.vatCode,vat:o.vat}),modelValueSetter:(t,o)=>(o.vat=t?.vat??0,console.log("MODEL",o.vat,t),t?.vatCode)}}};export{A as a,h as b};
