/*
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 { Base, String_$type, fromEnum, typeCast, markType, getInstanceType } from "igniteui-angular-core";
import { ISupportSetProperty_$type } from "./ISupportSetProperty";
import { List$1 } from "igniteui-angular-core";
import { CT_GeoPolygon } from "./CT_GeoPolygon";
import { CultureInfo } from "igniteui-angular-core";
import { parseNumber } from "igniteui-angular-core";
/**
 * @hidden
 */
var CT_GeoData = /** @class */ (function (_super) {
    tslib_1.__extends(CT_GeoData, _super);
    function CT_GeoData() {
        var _this = _super.call(this) || this;
        _this.c = null;
        _this.p = null;
        _this.n = null;
        _this.f = 0;
        _this.l = 0;
        _this.h = 0;
        _this.j = 0;
        _this.d = null;
        _this.b = null;
        _this.d = new List$1(CT_GeoPolygon.$, 0);
        _this.b = new List$1(String_$type, 0);
        return _this;
    }
    Object.defineProperty(CT_GeoData.prototype, "o", {
        get: function () {
            return this.p;
        },
        set: function (a) {
            this.p = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_GeoData.prototype, "m", {
        get: function () {
            return this.n;
        },
        set: function (a) {
            this.n = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_GeoData.prototype, "e", {
        get: function () {
            return this.f;
        },
        set: function (a) {
            this.f = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_GeoData.prototype, "k", {
        get: function () {
            return this.l;
        },
        set: function (a) {
            this.l = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_GeoData.prototype, "g", {
        get: function () {
            return this.h;
        },
        set: function (a) {
            this.h = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_GeoData.prototype, "i", {
        get: function () {
            return this.j;
        },
        set: function (a) {
            this.j = a;
        },
        enumerable: true,
        configurable: true
    });
    CT_GeoData.a = function (a) {
        var b = null;
        var c = null;
        var d = 0;
        var e = 0;
        var f = 0;
        var g = 0;
        var h = CT_GeoData.r(a, b, c, d, e, f, g);
        b = h.p1;
        c = h.p2;
        d = h.p3;
        e = h.p4;
        f = h.p5;
        g = h.p6;
        return ((function () {
            var $ret = new CT_GeoData();
            $ret.e = d;
            $ret.k = e;
            $ret.g = f;
            $ret.i = g;
            $ret.m = c;
            $ret.o = b;
            return $ret;
        })());
    };
    CT_GeoData.r = function (a, b, c, d, e, f, g) {
        var e_1, _a;
        b = null;
        c = null;
        d = 0;
        e = 0;
        f = 0;
        g = 0;
        try {
            for (var _b = tslib_1.__values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var h = _c.value;
                switch (h.a.e(a.d)) {
                    case "entityName":
                        b = h.d;
                        break;
                    case "entityId":
                        c = h.d;
                        break;
                    case "east":
                        d = parseNumber(h.d, CultureInfo.invariantCulture);
                        break;
                    case "west":
                        e = parseNumber(h.d, CultureInfo.invariantCulture);
                        break;
                    case "north":
                        f = parseNumber(h.d, CultureInfo.invariantCulture);
                        break;
                    case "south":
                        g = parseNumber(h.d, CultureInfo.invariantCulture);
                        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,
            p6: g
        };
    };
    CT_GeoData.s = function (a, b, c, d, e, f, g, h) {
        a.ad.p(b, "cx");
        var i = null;
        var j = null;
        j = "east";
        i = c.toString();
        a.ad.h(j, i);
        if (d != null) {
            j = "entityId";
            i = d;
            a.ad.h(j, i);
        }
        if (e != null) {
            j = "entityName";
            i = e;
            a.ad.h(j, i);
        }
        j = "north";
        i = f.toString();
        a.ad.h(j, i);
        j = "south";
        i = g.toString();
        a.ad.h(j, i);
        j = "west";
        i = h.toString();
        a.ad.h(j, i);
        ;
    };
    CT_GeoData.prototype.setProperty = function (a, b) {
        switch (a) {
            case 721:
                this.d.add(typeCast(CT_GeoPolygon.$, b));
                break;
            case 351:
                this.b.add(typeCast(String_$type, b));
                break;
            default: break;
        }
    };
    CT_GeoData.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_GeoData.$t = markType(CT_GeoData, 'CT_GeoData', Base.$, [ISupportSetProperty_$type]);
    return CT_GeoData;
}(Base));
export { CT_GeoData };
//# sourceMappingURL=CT_GeoData.js.map