import{f as S}from"./chunk-NWNWYATL.js";import{a as u}from"./chunk-SFW4HL5C.js";import{h as l,y as I}from"./chunk-WEQN5LYX.js";import{s as r,t as C,w as p,x as v}from"./chunk-V67SIXYX.js";import{c as a,d}from"./chunk-YADAVUVK.js";import{a as o,b as m,ka as h,la as g,od as f,qa as c,v as s,va as n}from"./chunk-HEIW4SFT.js";g();I();d();C();f();v();var A=(()=>{class i extends u{get model$(){return this._model$}get priceChangeItemsSumsS$(){return this._priceChangeItemsSumsS$}openAdditionalPanel(){this.openAdditionalPanelS.next()}get isEditMode(){return a.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,this.openAdditionalPanelS=new s(1),this.openAdditionalPanel$=this.openAdditionalPanelS.asObservable()}unset(){this.formGroup=void 0}fetch(e){return this.moveService.fetch(e||"").pipe(h(t=>{this.formGroup=new l([]),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,m(o({},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)(n(S),n(p))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{A as a};
