import{a as F}from"./chunk-VACV2QME.js";import{a as j,d as I}from"./chunk-MX2TZFKO.js";import{b as i,c as e,f as a,g as c}from"./chunk-BEITCLQT.js";import{B as T,E,G as P,Na as w,Oa as z,p,r as R,s as b,w as A,y as N}from"./chunk-AWFGQCOU.js";import{a as S,b as y}from"./chunk-CKUQY5IU.js";import{ya as D}from"./chunk-UNUNR43V.js";import{Ab as f,Tb as r,Wc as u,Xc as m,cc as v,dc as _,ec as d,gd as C,mb as s,rb as o}from"./chunk-AO7NUUXN.js";import{d as h,n as G}from"./chunk-HE7HQ6LI.js";G();var M=class g{constructor(l,t,n,L,B){this.data=l,this._dialogRef=t,this._fb=n,this._cdr=L,this._localizationService=B,this.form=this._fb.group({roundingLevel:this._fb.control(this.data.roundingLevel,p.required),roundingType:this._fb.control(this.data.roundingType??null,p.required)}),this.adjustmentPriceActRoundingLevel=[{id:i.Whole,name:a(this._localizationService.getSync.bind(this._localizationService))[i.Whole]},{id:i.NearestFive,name:a(this._localizationService.getSync.bind(this._localizationService))[i.NearestFive]},{id:i.NearestTen,name:a(this._localizationService.getSync.bind(this._localizationService))[i.NearestTen]}],this.adjustmentPriceActRoundingType=[{id:e.Mathematical,name:c(this._localizationService.getSync.bind(this._localizationService))[e.Mathematical]},{id:e.Upward,name:c(this._localizationService.getSync.bind(this._localizationService))[e.Upward]},{id:e.Downward,name:c(this._localizationService.getSync.bind(this._localizationService))[e.Downward]}]}ngOnInit(){this._dialogRef.submitData$$.next(this.form),this._dialogRef.instance?.submitted.pipe(y(this)).subscribe(()=>this._cdr.markForCheck())}static{this.\u0275fac=function(t){return new(t||g)(o(z),o(w),o(E),o(C),o(I))}}static{this.\u0275cmp=f({type:g,selectors:[["tis-rounding-price-dialog"]],decls:5,vars:11,consts:[[3,"formGroup"],["formControlName","roundingLevel",3,"options","showClearButton","label"],["formControlName","roundingType",3,"options","showClearButton","label"]],template:function(t,n){t&1&&(v(0,"form",0),d(1,"tis-dropdown",1),u(2,"translate"),d(3,"tis-dropdown",2),u(4,"translate"),_()),t&2&&(r("formGroup",n.form),s(),r("options",n.adjustmentPriceActRoundingLevel)("showClearButton",!1)("label",m(2,7,"\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u043E\u043A\u0440\u0443\u0433\u043B\u0435\u043D\u0438\u044F")),s(2),r("options",n.adjustmentPriceActRoundingType)("showClearButton",!1)("label",m(4,9,"\u0422\u0438\u043F \u043E\u043A\u0440\u0443\u0433\u043B\u0435\u043D\u0438\u044F")))},dependencies:[D,P,A,R,b,N,T,F,j],styles:[".count-info[_ngcontent-%COMP%]{margin-bottom:var(--space-vertical-l)}"],changeDetection:0})}};M=h([S()],M);export{M as a};
