/*
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 { 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
 */
export let ST_Angle = /*@__PURE__*/ (() => {
    class ST_Angle extends ValueType {
        constructor(a, ..._rest) {
            super();
            this.k = 0;
            a = (a == void 0) ? 0 : a;
            switch (a) {
                case 0: break;
                case 1:
                    {
                        let c = _rest[0];
                        this.k = c;
                    }
                    break;
            }
        }
        equals(a) {
            let 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());
        }
        getHashCode() {
            return (this.k);
        }
        toString() {
            return this.k.toString();
        }
        static a(a) {
            return new ST_Angle(1, a == 0 ? 0 : truncate(DocCoreUtils.x(a * 60000)));
        }
        static l(a) {
            return a == 0 ? 0 : truncate(DocCoreUtils.j(a * 60000));
        }
        static b(a) {
            let b = ST_Angle.m(a);
            if (ST_Angle.g(b, toNullable(ST_Angle.$, null))) {
                return b.getValueOrDefault();
            }
            throw DocCoreUtils.n(ST_Angle.$, a);
        }
        static j(a) {
            return a / 60000;
        }
        n() {
            return ST_Angle.j(this.k);
        }
        static m(a) {
            let b;
            if (((() => { let 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));
        }
        static c(a, b) {
            return a.k == b.k;
        }
        static d(a, b) {
            return a.k == b.k;
        }
        static e(a, b) {
            if (!a.hasValue) {
                return !b.hasValue;
            }
            else if (!b.hasValue) {
                return false;
            }
            return ST_Angle.d(a.value, b.value);
        }
        static f(a, b) {
            return !(ST_Angle.d(a, b));
        }
        static g(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;
})();
