/*
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, Boolean_$type, fromEnum, markType, getInstanceType } from "igniteui-angular-core";
import { ST_PageSetupOrientation_$type } from "./ST_PageSetupOrientation";
import { CultureInfo } from "igniteui-angular-core";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
import { ST_OnOff } from "./ST_OnOff";
import { parseUInt32_1, parseInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
var CT_PageSetup_Chart = /** @class */ (function (_super) {
    tslib_1.__extends(CT_PageSetup_Chart, _super);
    function CT_PageSetup_Chart() {
        var _this = _super.call(this) || this;
        _this.t = toNullable(Number_$type, null);
        _this.n = toNullable(Number_$type, null);
        _this.r = toNullable(ST_PageSetupOrientation_$type, null);
        _this.h = toNullable(Boolean_$type, null);
        _this.l = toNullable(Boolean_$type, null);
        _this.v = toNullable(Boolean_$type, null);
        _this.p = toNullable(Number_$type, null);
        _this.x = toNullable(Number_$type, null);
        _this.j = toNullable(Number_$type, null);
        return _this;
    }
    Object.defineProperty(CT_PageSetup_Chart.prototype, "s", {
        get: function () {
            return this.t;
        },
        set: function (a) {
            this.t = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PageSetup_Chart.prototype, "m", {
        get: function () {
            return this.n;
        },
        set: function (a) {
            this.n = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PageSetup_Chart.prototype, "q", {
        get: function () {
            return this.r;
        },
        set: function (a) {
            this.r = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PageSetup_Chart.prototype, "g", {
        get: function () {
            return this.h;
        },
        set: function (a) {
            this.h = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PageSetup_Chart.prototype, "k", {
        get: function () {
            return this.l;
        },
        set: function (a) {
            this.l = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PageSetup_Chart.prototype, "u", {
        get: function () {
            return this.v;
        },
        set: function (a) {
            this.v = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PageSetup_Chart.prototype, "o", {
        get: function () {
            return this.p;
        },
        set: function (a) {
            this.p = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PageSetup_Chart.prototype, "w", {
        get: function () {
            return this.x;
        },
        set: function (a) {
            this.x = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PageSetup_Chart.prototype, "i", {
        get: function () {
            return this.j;
        },
        set: function (a) {
            this.j = a;
        },
        enumerable: true,
        configurable: true
    });
    CT_PageSetup_Chart.ac = function (a, b, c, d, e, f, g, h, i, j) {
        var e_1, _a;
        b = toNullable(Number_$type, null);
        c = toNullable(Number_$type, null);
        d = toNullable(ST_PageSetupOrientation_$type, null);
        e = toNullable(Boolean_$type, null);
        f = toNullable(Boolean_$type, null);
        g = toNullable(Boolean_$type, null);
        h = toNullable(Number_$type, null);
        i = toNullable(Number_$type, null);
        j = toNullable(Number_$type, null);
        try {
            for (var _b = tslib_1.__values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var k = _c.value;
                switch (k.a.e(a.d)) {
                    case "paperSize":
                        b = toNullable(Number_$type, parseUInt32_1(k.d, CultureInfo.invariantCulture));
                        break;
                    case "firstPageNumber":
                        c = toNullable(Number_$type, parseUInt32_1(k.d, CultureInfo.invariantCulture));
                        break;
                    case "orientation":
                        d = toNullable(ST_PageSetupOrientation_$type, XmlNamespaceDefinitionBase.b(ST_PageSetupOrientation_$type, k.d));
                        break;
                    case "blackAndWhite":
                        e = toNullable(Boolean_$type, ST_OnOff.e(k.d));
                        break;
                    case "draft":
                        f = toNullable(Boolean_$type, ST_OnOff.e(k.d));
                        break;
                    case "useFirstPageNumber":
                        g = toNullable(Boolean_$type, ST_OnOff.e(k.d));
                        break;
                    case "horizontalDpi":
                        h = toNullable(Number_$type, parseInt32_1(k.d, CultureInfo.invariantCulture));
                        break;
                    case "verticalDpi":
                        i = toNullable(Number_$type, parseInt32_1(k.d, CultureInfo.invariantCulture));
                        break;
                    case "copies":
                        j = toNullable(Number_$type, parseUInt32_1(k.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,
            p7: h,
            p8: i,
            p9: j
        };
    };
    CT_PageSetup_Chart.ad = function (a, b, c, d, e, f, g, h, i, j, k) {
        if (c === void 0) { c = toNullable(Boolean_$type, null); }
        if (d === void 0) { d = toNullable(Number_$type, null); }
        if (e === void 0) { e = toNullable(Boolean_$type, null); }
        if (f === void 0) { f = toNullable(Number_$type, null); }
        if (g === void 0) { g = toNullable(Number_$type, null); }
        if (h === void 0) { h = toNullable(ST_PageSetupOrientation_$type, null); }
        if (i === void 0) { i = toNullable(Number_$type, null); }
        if (j === void 0) { j = toNullable(Boolean_$type, null); }
        if (k === void 0) { k = toNullable(Number_$type, null); }
        a.ad.p(b, "c");
        var l = null;
        var m = null;
        if (c.hasValue) {
            m = "blackAndWhite";
            l = ST_OnOff.g(c.value);
            a.ad.h(m, l);
        }
        if (d.hasValue) {
            m = "copies";
            l = d.value.toString();
            a.ad.h(m, l);
        }
        if (e.hasValue) {
            m = "draft";
            l = ST_OnOff.g(e.value);
            a.ad.h(m, l);
        }
        if (f.hasValue) {
            m = "firstPageNumber";
            l = f.value.toString();
            a.ad.h(m, l);
        }
        if (g.hasValue) {
            m = "horizontalDpi";
            l = g.value.toString();
            a.ad.h(m, l);
        }
        if (h.hasValue) {
            m = "orientation";
            l = XmlNamespaceDefinitionBase.f(ST_PageSetupOrientation_$type, h.value);
            a.ad.h(m, l);
        }
        if (i.hasValue) {
            m = "paperSize";
            l = i.value.toString();
            a.ad.h(m, l);
        }
        if (j.hasValue) {
            m = "useFirstPageNumber";
            l = ST_OnOff.g(j.value);
            a.ad.h(m, l);
        }
        if (k.hasValue) {
            m = "verticalDpi";
            l = k.value.toString();
            a.ad.h(m, l);
        }
        ;
    };
    CT_PageSetup_Chart.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_PageSetup_Chart.$t = markType(CT_PageSetup_Chart, 'CT_PageSetup_Chart');
    return CT_PageSetup_Chart;
}(Base));
export { CT_PageSetup_Chart };
//# sourceMappingURL=CT_PageSetup_Chart.js.map