/*
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, Number_$type, fromEnum, typeCast, markType, getInstanceType } from "igniteui-angular-core";
import { ISupportSetProperty_$type } from "./ISupportSetProperty";
import { CT_SphereCoords } from "./CT_SphereCoords";
import { ST_PresetCameraType_$type } from "./ST_PresetCameraType";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
import { CultureInfo } from "igniteui-angular-core";
import { parseInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
export class CT_Camera extends Base {
    constructor() {
        super();
        this.c = null;
        this.e = 0;
        this.h = toNullable(Number_$type, null);
        this.j = toNullable(Number_$type, null);
    }
    get b() {
        return this.c;
    }
    set b(a) {
        this.c = a;
    }
    get d() {
        return this.e;
    }
    set d(a) {
        this.e = a;
    }
    get g() {
        return this.h;
    }
    set g(a) {
        this.h = a;
    }
    get i() {
        return this.j;
    }
    set i(a) {
        this.j = a;
    }
    static a(a) {
        let b = 0;
        let c = toNullable(Number_$type, null);
        let d = toNullable(Number_$type, null);
        let e = CT_Camera.l(a, b, c, d);
        b = e.p1;
        c = e.p2;
        d = e.p3;
        return ((() => {
            let $ret = new CT_Camera();
            $ret.d = b;
            $ret.g = c;
            $ret.i = d;
            return $ret;
        })());
    }
    static l(a, b, c, d) {
        b = 0;
        c = toNullable(Number_$type, null);
        d = toNullable(Number_$type, null);
        for (let e of fromEnum(a.ab.u)) {
            switch (e.a.e(a.d)) {
                case "prst":
                    b = XmlNamespaceDefinitionBase.b(ST_PresetCameraType_$type, e.d);
                    break;
                case "fov":
                    c = toNullable(Number_$type, parseInt32_1(e.d, CultureInfo.invariantCulture));
                    break;
                case "zoom":
                    d = toNullable(Number_$type, parseInt32_1(e.d, CultureInfo.invariantCulture));
                    break;
                default: break;
            }
        }
        ;
        return {
            p1: b,
            p2: c,
            p3: d
        };
    }
    static m(a, b, c, d, e) {
        a.ad.p(b, "a");
        let f = null;
        let g = null;
        if (c.hasValue) {
            g = "fov";
            f = c.value.toString();
            a.ad.h(g, f);
        }
        if (d.hasValue) {
            g = "zoom";
            f = d.value.toString();
            a.ad.h(g, f);
        }
        g = "prst";
        f = XmlNamespaceDefinitionBase.f(ST_PresetCameraType_$type, e);
        a.ad.h(g, f);
        ;
    }
    setProperty(a, b) {
        switch (a) {
            case 1370:
                this.b = typeCast(CT_SphereCoords.$, b);
                break;
            default: break;
        }
    }
    toString() {
        let a = getInstanceType(this);
        return a != null ? a.typeName : super.toString();
    }
}
CT_Camera.$t = markType(CT_Camera, 'CT_Camera', Base.$, [ISupportSetProperty_$type]);
//# sourceMappingURL=CT_Camera.js.map