/*
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, markStruct } from "igniteui-angular-core";
import { ST_GeomGuideName } from "./ST_GeomGuideName";
import { ST_Coordinate } from "./ST_Coordinate";
import { nullableNotEquals } from "igniteui-angular-core";
import { stringEmpty } from "igniteui-angular-core";
/**
 * @hidden
 */
export class ST_AdjCoordinate extends ValueType {
    constructor(a, ..._rest) {
        super();
        this.b = toNullable(ST_Coordinate.$, null);
        this.c = toNullable(ST_GeomGuideName.$, null);
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0: break;
            case 1:
                {
                    let c = _rest[0];
                    this.b = toNullable(ST_Coordinate.$, null);
                    this.c = toNullable(ST_GeomGuideName.$, new ST_GeomGuideName(1, c));
                }
                break;
            case 2:
                {
                    let c = _rest[0];
                    this.b = toNullable(ST_Coordinate.$, c);
                    this.c = toNullable(ST_GeomGuideName.$, null);
                }
                break;
        }
    }
    get e() {
        return this.c;
    }
    get d() {
        return this.b;
    }
    static a(a) {
        let b = ST_Coordinate.s(a);
        if (nullableNotEquals(b, null)) {
            return new ST_AdjCoordinate(2, b.value);
        }
        return new ST_AdjCoordinate(1, a);
    }
    static f(a) {
        if (a.d.hasValue) {
            return a.d.value.toString();
        }
        else if (a.e.hasValue) {
            return a.e.value.toString();
        }
        else {
            return stringEmpty();
        }
    }
}
ST_AdjCoordinate.$t = markStruct(ST_AdjCoordinate, 'ST_AdjCoordinate');
//# sourceMappingURL=ST_AdjCoordinate.js.map