import{g as S}from"./chunk-D6IW2FLL.js";import{a as l}from"./chunk-CVN2SFTO.js";import{h as u,y as d}from"./chunk-PZHJ5CIW.js";import{s as r,t as I,w as a,x as v}from"./chunk-CPKBOKTQ.js";import{c as p,d as C}from"./chunk-ANX7B7LC.js";import{a as m,b as n,ka as c,la as g,nd as f,qa as h,v as s,va as o}from"./chunk-PGS4AHIT.js";g();d();C();I();f();v();var w=(()=>{class i extends l{get model$(){return this._model$}get priceChangeItemsSumsS$(){return this._priceChangeItemsSumsS$}get isEditMode(){return p.isSet(this.model?.acKey)}constructor(e,t){super(),this.moveService=e,this.api=t,this.modelS=new s(1),this._model$=this.modelS.asObservable(),this.model=null,this.priceChangeItemsSumsS=new s(1),this._priceChangeItemsSumsS$=this.priceChangeItemsSumsS.asObservable(),this.priceChangeItemsSums=null}unset(){this.formGroup=void 0}fetch(e){return this.moveService.fetch(e||"").pipe(c(t=>{this.formGroup=new u([]),this.model=t,this.modelS.next(t),e?this.setItemsSums(t.invoiceSum):this.priceChangeItemsSumsS.next(null)}))}setItemsSums(e){this.priceChangeItemsSums=e,this.priceChangeItemsSumsS.next(e)}cratePriceChange(e){return this.api.post(r.priceChange.createPriceChangeDoc,n(m({},e),{fromDocTypes:e.fromDocTypes?e.fromDocTypes.join(","):null}))}getWholesalePriceChangeDocumentTypes(){return this.api.get(r.priceChange.getWholesalePriceChangeDocumentTypes)}getPriceChangeDocumentTypes(){return this.api.get(r.priceChange.getPriceChangeDocumentTypes())}static{this.\u0275fac=function(t){return new(t||i)(o(S),o(a))}}static{this.\u0275prov=h({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{w as a};
