/*
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 * as tslib_1 from "tslib";
import { ValueType, toNullable, typeCast, markStruct } from "igniteui-angular-core";
import { CultureInfo } from "igniteui-angular-core";
import { DocCoreUtils } from "./DocCoreUtils";
import { truncate } from "igniteui-angular-core";
import { tryParseInt32_2 } from "igniteui-angular-core";
/**
 * @hidden
 */
var ST_Angle = /** @class */ (function (_super) {
    tslib_1.__extends(ST_Angle, _super);
    function ST_Angle(a) {
        var _rest = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            _rest[_i - 1] = arguments[_i];
        }
        var _this = _super.call(this) || this;
        _this.k = 0;
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0: break;
            case 1:
                {
                    var c = _rest[0];
                    _this.k = c;
                }
                break;
        }
        return _this;
    }
    ST_Angle.prototype.equals = function (a) {
        var b = toNullable(ST_Angle.$, typeCast(ST_Angle.$, a));
        if (ST_Angle.g(b, toNullable(ST_Angle.$, null))) {
            return false;
        }
        return ST_Angle.d(this, b.getValueOrDefault());
    };
    ST_Angle.prototype.getHashCode = function () {
        return (this.k);
    };
    ST_Angle.prototype.toString = function () {
        return this.k.toString();
    };
    ST_Angle.a = function (a) {
        return new ST_Angle(1, a == 0 ? 0 : truncate(DocCoreUtils.w(a * 60000)));
    };
    ST_Angle.l = function (a) {
        return a == 0 ? 0 : truncate(DocCoreUtils.j(a * 60000));
    };
    ST_Angle.b = function (a) {
        var b = ST_Angle.m(a);
        if (ST_Angle.g(b, toNullable(ST_Angle.$, null))) {
            return b.getValueOrDefault();
        }
        throw DocCoreUtils.n(ST_Angle.$, a);
    };
    ST_Angle.j = function (a) {
        return a / 60000;
    };
    ST_Angle.prototype.n = function () {
        return ST_Angle.j(this.k);
    };
    ST_Angle.m = function (a) {
        var b;
        if (((function () { var c = tryParseInt32_2(a, 7, CultureInfo.invariantCulture, b); b = c.p3; return c.ret; })()) == false) {
            return toNullable(ST_Angle.$, null);
        }
        return toNullable(ST_Angle.$, new ST_Angle(1, b));
    };
    ST_Angle.c = function (a, b) {
        return a.k == b.k;
    };
    ST_Angle.d = function (a, b) {
        return a.k == b.k;
    };
    ST_Angle.e = function (a, b) {
        if (!a.hasValue) {
            return !b.hasValue;
        }
        else if (!b.hasValue) {
            return false;
        }
        return ST_Angle.d(a.value, b.value);
    };
    ST_Angle.f = function (a, b) {
        return !(ST_Angle.d(a, b));
    };
    ST_Angle.g = function (a, b) {
        if (!a.hasValue) {
            return b.hasValue;
        }
        else if (!b.hasValue) {
            return true;
        }
        return ST_Angle.f(a.value, b.value);
    };
    ST_Angle.$t = markStruct(ST_Angle, 'ST_Angle');
    return ST_Angle;
}(ValueType));
export { ST_Angle };
//# sourceMappingURL=ST_Angle.js.map