import{e as a}from"./chunk-JWVEGNOJ.js";import{c as n,f}from"./chunk-GTAUKNDY.js";import{c as s,d as l}from"./chunk-PBM4LEG7.js";import{nd as c,qa as o,va as e}from"./chunk-PGS4AHIT.js";l();c();f();var h=(()=>{class i{constructor(t,r){this.dialogService=t,this.translate=r}validateRebate(t,r){return r&&r>0&&r<this.toNumber(t)?(this.dialogService.openTyped({type:"error",text:this.translate.instant("MaxRebateError",{0:r}),confirmButtonLabel:"Ok",denyButtonLabel:null}),!1):!0}toNumber(t){if(t==null||t==="")return 0;let r=typeof t=="string"?s.strToFloat(t):Number(t);return isNaN(r)?0:r}static{this.\u0275fac=function(r){return new(r||i)(e(a),e(n))}}static{this.\u0275prov=o({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{h as a};
