/*
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 { __extends } from "tslib";
import { FormatSpecifier } from "./FormatSpecifier";
import { markType } from "./type";
/**
 * @hidden
 */
var NumberFormatSpecifier = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(NumberFormatSpecifier, _super);
    function NumberFormatSpecifier() {
        var _this = _super.call(this) || this;
        _this._locale = null;
        _this._compactDisplay = null;
        _this._currency = null;
        _this._currencyDisplay = null;
        _this._currencySign = null;
        _this._localeMatcher = null;
        _this._notation = null;
        _this._numberingSystem = null;
        _this._signDisplay = null;
        _this._style = null;
        _this._unit = null;
        _this._unitDisplay = null;
        _this._useGrouping = false;
        _this._minimumIntegerDigits = 0;
        _this._minimumFractionDigits = 0;
        _this._maximumFractionDigits = 0;
        _this._minimumSignificantDigits = 0;
        _this._maximumSignificantDigits = 0;
        _this.useGrouping = true;
        _this.minimumIntegerDigits = -1;
        _this.minimumFractionDigits = -1;
        _this.minimumSignificantDigits = -1;
        _this.maximumFractionDigits = -1;
        _this.maximumSignificantDigits = -1;
        return _this;
    }
    NumberFormatSpecifier.prototype.toIntl = function () {
        var a = {};
        if (this.compactDisplay != null) {
            this.t(a, "compactDisplay", this.compactDisplay);
        }
        if (this.currency != null) {
            this.t(a, "currency", this.currency);
        }
        if (this.currencyDisplay != null) {
            this.t(a, "currencyDisplay", this.currencyDisplay);
        }
        if (this.currencySign != null) {
            this.t(a, "currencySign", this.currencySign);
        }
        if (this.localeMatcher != null) {
            this.t(a, "localeMatcher", this.localeMatcher);
        }
        if (this.notation != null) {
            this.t(a, "notation", this.notation);
        }
        if (this.numberingSystem != null) {
            this.t(a, "numberingSystem", this.numberingSystem);
        }
        if (this.signDisplay != null) {
            this.t(a, "signDisplay", this.signDisplay);
        }
        if (this.style != null) {
            this.t(a, "style", this.style);
        }
        if (this.unit != null) {
            this.t(a, "unit", this.unit);
        }
        if (this.unitDisplay != null) {
            this.t(a, "unitDisplay", this.unitDisplay);
        }
        if (this.useGrouping != true) {
            this.t(a, "useGrouping", this.useGrouping);
        }
        if (this.minimumIntegerDigits != -1) {
            this.t(a, "minimumIntegerDigits", this.minimumIntegerDigits);
        }
        if (this.minimumFractionDigits != -1) {
            this.t(a, "minimumFractionDigits", this.minimumFractionDigits);
        }
        if (this.maximumFractionDigits != -1) {
            this.t(a, "maximumFractionDigits", this.maximumFractionDigits);
        }
        if (this.minimumSignificantDigits != -1) {
            this.t(a, "minimumSignificantDigits", this.minimumSignificantDigits);
        }
        if (this.maximumSignificantDigits != -1) {
            this.t(a, "maximumSignificantDigits", this.maximumSignificantDigits);
        }
        var locale_ = this.locale;
        var options_ = a;
        return new Intl.NumberFormat(locale_, options_);
    };
    NumberFormatSpecifier.prototype.t = function (options_, propertyName_, value_) {
        options_[propertyName_] = value_;
    };
    Object.defineProperty(NumberFormatSpecifier.prototype, "locale", {
        get: function () {
            return this._locale;
        },
        set: function (a) {
            this._locale = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "compactDisplay", {
        get: function () {
            return this._compactDisplay;
        },
        set: function (a) {
            this._compactDisplay = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "currency", {
        get: function () {
            return this._currency;
        },
        set: function (a) {
            this._currency = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "currencyDisplay", {
        get: function () {
            return this._currencyDisplay;
        },
        set: function (a) {
            this._currencyDisplay = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "currencySign", {
        get: function () {
            return this._currencySign;
        },
        set: function (a) {
            this._currencySign = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "localeMatcher", {
        get: function () {
            return this._localeMatcher;
        },
        set: function (a) {
            this._localeMatcher = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "notation", {
        get: function () {
            return this._notation;
        },
        set: function (a) {
            this._notation = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "numberingSystem", {
        get: function () {
            return this._numberingSystem;
        },
        set: function (a) {
            this._numberingSystem = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "signDisplay", {
        get: function () {
            return this._signDisplay;
        },
        set: function (a) {
            this._signDisplay = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "style", {
        get: function () {
            return this._style;
        },
        set: function (a) {
            this._style = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "unit", {
        get: function () {
            return this._unit;
        },
        set: function (a) {
            this._unit = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "unitDisplay", {
        get: function () {
            return this._unitDisplay;
        },
        set: function (a) {
            this._unitDisplay = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "useGrouping", {
        get: function () {
            return this._useGrouping;
        },
        set: function (a) {
            this._useGrouping = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "minimumIntegerDigits", {
        get: function () {
            return this._minimumIntegerDigits;
        },
        set: function (a) {
            this._minimumIntegerDigits = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "minimumFractionDigits", {
        get: function () {
            return this._minimumFractionDigits;
        },
        set: function (a) {
            this._minimumFractionDigits = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "maximumFractionDigits", {
        get: function () {
            return this._maximumFractionDigits;
        },
        set: function (a) {
            this._maximumFractionDigits = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "minimumSignificantDigits", {
        get: function () {
            return this._minimumSignificantDigits;
        },
        set: function (a) {
            this._minimumSignificantDigits = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(NumberFormatSpecifier.prototype, "maximumSignificantDigits", {
        get: function () {
            return this._maximumSignificantDigits;
        },
        set: function (a) {
            this._maximumSignificantDigits = a;
        },
        enumerable: false,
        configurable: true
    });
    NumberFormatSpecifier.$t = markType(NumberFormatSpecifier, 'NumberFormatSpecifier', FormatSpecifier.$);
    return NumberFormatSpecifier;
}(FormatSpecifier));
export { NumberFormatSpecifier };
