/*
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, __values } from "tslib";
import { Base, toNullable, fromEnum, typeCast, markType, getInstanceType } from "igniteui-angular-core";
import { ISupportSetProperty_$type } from "./ISupportSetProperty";
import { CT_GeoCache } from "./CT_GeoCache";
import { ST_GeoProjectionType_$type } from "./ST_GeoProjectionType";
import { ST_GeoMappingLevel_$type } from "./ST_GeoMappingLevel";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
/**
 * @hidden
 */
var CT_Geography = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CT_Geography, _super);
    function CT_Geography() {
        var _this = _super.call(this) || this;
        _this.b = null;
        _this.e = toNullable(ST_GeoProjectionType_$type, null);
        _this.g = toNullable(ST_GeoMappingLevel_$type, null);
        _this.k = null;
        _this.m = null;
        _this.i = null;
        return _this;
    }
    Object.defineProperty(CT_Geography.prototype, "a", {
        get: function () {
            return this.b;
        },
        set: function (a) {
            this.b = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_Geography.prototype, "d", {
        get: function () {
            return this.e;
        },
        set: function (a) {
            this.e = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_Geography.prototype, "f", {
        get: function () {
            return this.g;
        },
        set: function (a) {
            this.g = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_Geography.prototype, "j", {
        get: function () {
            return this.k;
        },
        set: function (a) {
            this.k = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_Geography.prototype, "l", {
        get: function () {
            return this.m;
        },
        set: function (a) {
            this.m = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_Geography.prototype, "h", {
        get: function () {
            return this.i;
        },
        set: function (a) {
            this.i = a;
        },
        enumerable: false,
        configurable: true
    });
    CT_Geography.c = function (a) {
        var b = toNullable(ST_GeoProjectionType_$type, null);
        var c = toNullable(ST_GeoMappingLevel_$type, null);
        var d = null;
        var e = null;
        var f = null;
        var g = CT_Geography.o(a, b, c, d, e, f);
        b = g.p1;
        c = g.p2;
        d = g.p3;
        e = g.p4;
        f = g.p5;
        return ((function () {
            var $ret = new CT_Geography();
            $ret.h = f;
            $ret.j = d;
            $ret.l = e;
            $ret.d = b;
            $ret.f = c;
            return $ret;
        })());
    };
    CT_Geography.o = function (a, b, c, d, e, f) {
        var e_1, _a;
        b = toNullable(ST_GeoProjectionType_$type, null);
        c = toNullable(ST_GeoMappingLevel_$type, null);
        d = null;
        e = null;
        f = null;
        try {
            for (var _b = __values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var g = _c.value;
                switch (g.a.e(a.d)) {
                    case "projectionType":
                        b = toNullable(ST_GeoProjectionType_$type, XmlNamespaceDefinitionBase.b(ST_GeoProjectionType_$type, g.d));
                        break;
                    case "viewedRegionType":
                        c = toNullable(ST_GeoMappingLevel_$type, XmlNamespaceDefinitionBase.b(ST_GeoMappingLevel_$type, g.d));
                        break;
                    case "cultureLanguage":
                        d = g.d;
                        break;
                    case "cultureRegion":
                        e = g.d;
                        break;
                    case "attribution":
                        f = g.d;
                        break;
                    default: break;
                }
            }
        }
        catch (e_1_1) {
            e_1 = { error: e_1_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_1)
                    throw e_1.error;
            }
        }
        ;
        return {
            p1: b,
            p2: c,
            p3: d,
            p4: e,
            p5: f
        };
    };
    CT_Geography.p = function (a, b, c, d, e, f, g) {
        a.ad.p(b, "cx");
        var h = null;
        var i = null;
        if (c.hasValue) {
            i = "projectionType";
            h = XmlNamespaceDefinitionBase.p(ST_GeoProjectionType_$type, c.value);
            a.ad.h(i, h);
        }
        if (d.hasValue) {
            i = "viewedRegionType";
            h = XmlNamespaceDefinitionBase.p(ST_GeoMappingLevel_$type, d.value);
            a.ad.h(i, h);
        }
        if (e != null) {
            i = "attribution";
            h = e;
            a.ad.h(i, h);
        }
        if (f != null) {
            i = "cultureLanguage";
            h = f;
            a.ad.h(i, h);
        }
        if (g != null) {
            i = "cultureRegion";
            h = g;
            a.ad.h(i, h);
        }
        ;
    };
    CT_Geography.prototype.setProperty = function (a, b) {
        switch (a) {
            case 700:
                this.a = typeCast(CT_GeoCache.$, b);
                break;
            default: break;
        }
    };
    CT_Geography.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_Geography.$t = markType(CT_Geography, 'CT_Geography', Base.$, [ISupportSetProperty_$type]);
    return CT_Geography;
}(Base));
export { CT_Geography };
