import{a as h}from"./chunk-KGCVL6CP.js";import{I as z,La as j}from"./chunk-QHAVDXDG.js";import{X as E,Z as F,ca as L,f as D,g as b,j as R,n as A,o as N,q as T,s as w}from"./chunk-27KSTDMK.js";import{d as e,e as i,i as c,j as l}from"./chunk-3WWEFG5Z.js";import{z as C}from"./chunk-GQAU5ACB.js";import{Bb as o,Ea as f,Ib as v,fd as m,gd as p,hc as a,ic as _,jc as S,kc as d,qa as g,sb as u,yd as y}from"./chunk-ISMRT7VU.js";var x=(()=>{class r{constructor(s,t,n,M,P){this.data=s,this._dialogRef=t,this._fb=n,this._cdr=M,this._localizationService=P,this.destroyRef=g(f),this.form=this._fb.group({roundingLevel:this._fb.control(this.data.roundingLevel,h()),roundingType:this._fb.control(this.data.roundingType??null,h())}),this.adjustmentPriceActRoundingLevel=[{id:e.Whole,name:c(this._localizationService.getSync.bind(this._localizationService))[e.Whole]},{id:e.NearestFive,name:c(this._localizationService.getSync.bind(this._localizationService))[e.NearestFive]},{id:e.NearestTen,name:c(this._localizationService.getSync.bind(this._localizationService))[e.NearestTen]}],this.adjustmentPriceActRoundingType=[{id:i.Mathematical,name:l(this._localizationService.getSync.bind(this._localizationService))[i.Mathematical]},{id:i.Upward,name:l(this._localizationService.getSync.bind(this._localizationService))[i.Upward]},{id:i.Downward,name:l(this._localizationService.getSync.bind(this._localizationService))[i.Downward]}]}ngOnInit(){this._dialogRef.submitData$$.next(this.form),this._dialogRef.instance?.submitted.pipe(C(this.destroyRef)).subscribe(()=>this._cdr.markForCheck())}static{this.\u0275fac=function(t){return new(t||r)(o(F),o(E),o(T),o(y),o(j))}}static{this.\u0275cmp=v({type:r,selectors:[["tis-rounding-price-dialog"]],decls:5,vars:13,consts:[[3,"formGroup"],["formControlName","roundingLevel",3,"requiredForLabel","options","showClearButton","label"],["formControlName","roundingType",3,"requiredForLabel","options","showClearButton","label"]],template:function(t,n){t&1&&(_(0,"form",0),d(1,"wk-dropdown",1),m(2,"translate"),d(3,"wk-dropdown",2),m(4,"translate"),S()),t&2&&(a("formGroup",n.form),u(),a("requiredForLabel",!0)("options",n.adjustmentPriceActRoundingLevel)("showClearButton",!1)("label",p(2,9,"\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u043E\u043A\u0440\u0443\u0433\u043B\u0435\u043D\u0438\u044F")),u(2),a("requiredForLabel",!0)("options",n.adjustmentPriceActRoundingType)("showClearButton",!1)("label",p(4,11,"\u0422\u0438\u043F \u043E\u043A\u0440\u0443\u0433\u043B\u0435\u043D\u0438\u044F")))},dependencies:[w,R,D,b,N,A,L,z],styles:[`.count-info[_ngcontent-%COMP%]{margin-bottom:var(--space-vertical-16)}
/*# sourceMappingURL=rounding-price-dialog.component-HMHMXCZJ.css.map */`],changeDetection:0})}}return r})();export{x as a};
//# sourceMappingURL=chunk-2QYOQ2X3.js.map
