/*
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 { ValueType, toNullable, typeCast, Number_$type, markStruct } from "igniteui-angular-core";
import { ST_Percentage } from "./ST_Percentage";
import { DocCoreUtils } from "./DocCoreUtils";
/**
 * @hidden
 */
var ST_PositivePercentage = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(ST_PositivePercentage, _super);
    function ST_PositivePercentage(a) {
        var _rest = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            _rest[_i - 1] = arguments[_i];
        }
        var _this = _super.call(this) || this;
        _this.a = new ST_Percentage();
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0: break;
            case 1:
                {
                    var c = _rest[0];
                    DocCoreUtils.aw(ST_PositivePercentage.$, ST_Percentage.l(c), "value", 0, 1.7976931348623157E+308);
                    _this.a = c;
                }
                break;
        }
        return _this;
    }
    ST_PositivePercentage.prototype.equals = function (a) {
        var b = toNullable(ST_PositivePercentage.$, typeCast(ST_PositivePercentage.$, a));
        if (ST_PositivePercentage.j(b, toNullable(ST_PositivePercentage.$, null))) {
            return false;
        }
        return ST_PositivePercentage.g(this, b.getValueOrDefault());
    };
    ST_PositivePercentage.prototype.getHashCode = function () {
        return this.a.getHashCode();
    };
    ST_PositivePercentage.prototype.toString = function () {
        return this.s(1);
    };
    ST_PositivePercentage.prototype.s = function (a) {
        return this.a.r(a);
    };
    ST_PositivePercentage.f = function (a, b) {
        var c = ST_PositivePercentage.r(a, b);
        if (ST_PositivePercentage.j(c, toNullable(ST_PositivePercentage.$, null))) {
            return c.getValueOrDefault();
        }
        throw DocCoreUtils.n(ST_PositivePercentage.$, a);
    };
    ST_PositivePercentage.r = function (a, b) {
        return ST_PositivePercentage.q(ST_Percentage.q(a, b));
    };
    ST_PositivePercentage.g = function (a, b) {
        return ST_Percentage.e(a.a, b.a);
    };
    ST_PositivePercentage.h = function (a, b) {
        if (!a.hasValue) {
            return !b.hasValue;
        }
        else if (!b.hasValue) {
            return false;
        }
        return ST_PositivePercentage.g(a.value, b.value);
    };
    ST_PositivePercentage.i = function (a, b) {
        return !(ST_PositivePercentage.g(a, b));
    };
    ST_PositivePercentage.j = function (a, b) {
        if (!a.hasValue) {
            return b.hasValue;
        }
        else if (!b.hasValue) {
            return true;
        }
        return ST_PositivePercentage.i(a.value, b.value);
    };
    ST_PositivePercentage.d = function (a) {
        return new ST_PositivePercentage(1, a);
    };
    ST_PositivePercentage.q = function (a) {
        if (!a.hasValue) {
            return toNullable(ST_PositivePercentage.$, null);
        }
        return toNullable(ST_PositivePercentage.$, ST_PositivePercentage.d(a.value));
    };
    ST_PositivePercentage.b = function (a) {
        return a.a;
    };
    ST_PositivePercentage.p = function (a) {
        if (!a.hasValue) {
            return toNullable(ST_Percentage.$, null);
        }
        return toNullable(ST_Percentage.$, ST_PositivePercentage.b(a.value));
    };
    ST_PositivePercentage.m = function (a) {
        return ST_Percentage.l(a.a);
    };
    ST_PositivePercentage.o = function (a) {
        if (!a.hasValue) {
            return toNullable(Number_$type, null);
        }
        return toNullable(Number_$type, ST_PositivePercentage.m(a.value));
    };
    ST_PositivePercentage.$t = markStruct(ST_PositivePercentage, 'ST_PositivePercentage');
    return ST_PositivePercentage;
}(ValueType));
export { ST_PositivePercentage };
