/*
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 { 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
 */
export class CT_Geography extends Base {
    constructor() {
        super();
        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;
    }
    get a() {
        return this.b;
    }
    set a(a) {
        this.b = a;
    }
    get d() {
        return this.e;
    }
    set d(a) {
        this.e = a;
    }
    get f() {
        return this.g;
    }
    set f(a) {
        this.g = a;
    }
    get j() {
        return this.k;
    }
    set j(a) {
        this.k = a;
    }
    get l() {
        return this.m;
    }
    set l(a) {
        this.m = a;
    }
    get h() {
        return this.i;
    }
    set h(a) {
        this.i = a;
    }
    static c(a) {
        let b = toNullable(ST_GeoProjectionType_$type, null);
        let c = toNullable(ST_GeoMappingLevel_$type, null);
        let d = null;
        let e = null;
        let f = null;
        let 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 ((() => {
            let $ret = new CT_Geography();
            $ret.h = f;
            $ret.j = d;
            $ret.l = e;
            $ret.d = b;
            $ret.f = c;
            return $ret;
        })());
    }
    static o(a, b, c, d, e, f) {
        b = toNullable(ST_GeoProjectionType_$type, null);
        c = toNullable(ST_GeoMappingLevel_$type, null);
        d = null;
        e = null;
        f = null;
        for (let g of fromEnum(a.ab.u)) {
            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;
            }
        }
        ;
        return {
            p1: b,
            p2: c,
            p3: d,
            p4: e,
            p5: f
        };
    }
    static p(a, b, c, d, e, f, g) {
        a.ad.p(b, "cx");
        let h = null;
        let i = null;
        if (c.hasValue) {
            i = "projectionType";
            h = XmlNamespaceDefinitionBase.f(ST_GeoProjectionType_$type, c.value);
            a.ad.h(i, h);
        }
        if (d.hasValue) {
            i = "viewedRegionType";
            h = XmlNamespaceDefinitionBase.f(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);
        }
        ;
    }
    setProperty(a, b) {
        switch (a) {
            case 700:
                this.a = typeCast(CT_GeoCache.$, b);
                break;
            default: break;
        }
    }
    toString() {
        let a = getInstanceType(this);
        return a != null ? a.typeName : super.toString();
    }
}
CT_Geography.$t = markType(CT_Geography, 'CT_Geography', Base.$, [ISupportSetProperty_$type]);
//# sourceMappingURL=CT_Geography.js.map