/*
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, 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
 */
var CT_Camera = /** @class */ (function (_super) {
    tslib_1.__extends(CT_Camera, _super);
    function CT_Camera() {
        var _this = _super.call(this) || this;
        _this.c = null;
        _this.e = 0;
        _this.h = toNullable(Number_$type, null);
        _this.j = toNullable(Number_$type, null);
        return _this;
    }
    Object.defineProperty(CT_Camera.prototype, "b", {
        get: function () {
            return this.c;
        },
        set: function (a) {
            this.c = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_Camera.prototype, "d", {
        get: function () {
            return this.e;
        },
        set: function (a) {
            this.e = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_Camera.prototype, "g", {
        get: function () {
            return this.h;
        },
        set: function (a) {
            this.h = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_Camera.prototype, "i", {
        get: function () {
            return this.j;
        },
        set: function (a) {
            this.j = a;
        },
        enumerable: true,
        configurable: true
    });
    CT_Camera.a = function (a) {
        var b = 0;
        var c = toNullable(Number_$type, null);
        var d = toNullable(Number_$type, null);
        var e = CT_Camera.l(a, b, c, d);
        b = e.p1;
        c = e.p2;
        d = e.p3;
        return ((function () {
            var $ret = new CT_Camera();
            $ret.d = b;
            $ret.g = c;
            $ret.i = d;
            return $ret;
        })());
    };
    CT_Camera.l = function (a, b, c, d) {
        var e_1, _a;
        b = 0;
        c = toNullable(Number_$type, null);
        d = toNullable(Number_$type, null);
        try {
            for (var _b = tslib_1.__values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var e = _c.value;
                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;
                }
            }
        }
        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
        };
    };
    CT_Camera.m = function (a, b, c, d, e) {
        a.ad.p(b, "a");
        var f = null;
        var 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);
        ;
    };
    CT_Camera.prototype.setProperty = function (a, b) {
        switch (a) {
            case 1370:
                this.b = typeCast(CT_SphereCoords.$, b);
                break;
            default: break;
        }
    };
    CT_Camera.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_Camera.$t = markType(CT_Camera, 'CT_Camera', Base.$, [ISupportSetProperty_$type]);
    return CT_Camera;
}(Base));
export { CT_Camera };
//# sourceMappingURL=CT_Camera.js.map