/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Base, markType } from "igniteui-angular-core";
import { INumberAbbreviator_$type } from "./INumberAbbreviator";
import { MathUtil } from "igniteui-angular-core";
import { round10N } from "igniteui-angular-core";
/**
 * @hidden
 */
export let NumberAbbreviator = /*@__PURE__*/ (() => {
    class NumberAbbreviator extends Base {
        abbreviate(a) {
            let b = Math.abs(a);
            let c = ['Q', 'T', 'B', 'M', 'K'];
            let d = [1E+15, 1000000000000, 1000000000, 1000000, 1000];
            for (let e = 0; e < c.length; e++) {
                if (b >= d[e]) {
                    return round10N(a / d[e], 1).toString() + c[e];
                }
            }
            return MathUtil.n(a);
        }
    }
    NumberAbbreviator.$t = markType(NumberAbbreviator, 'NumberAbbreviator', Base.$, [INumberAbbreviator_$type]);
    return NumberAbbreviator;
})();
//# sourceMappingURL=NumberAbbreviator.js.map
