/*
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 { List$1 } from "igniteui-angular-core";
import { CT_DdeValue } from "./CT_DdeValue";
import { CultureInfo } from "igniteui-angular-core";
import { parseUInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
var CT_DdeValues = /** @class */ (function (_super) {
    tslib_1.__extends(CT_DdeValues, _super);
    function CT_DdeValues() {
        var _this = _super.call(this) || this;
        _this.a = null;
        _this.c = toNullable(Number_$type, null);
        _this.b = toNullable(Number_$type, null);
        _this.a = new List$1(CT_DdeValue.$, 0);
        return _this;
    }
    CT_DdeValues.g = function (a, b, c) {
        var e_1, _a;
        b = toNullable(Number_$type, null);
        c = toNullable(Number_$type, null);
        try {
            for (var _b = tslib_1.__values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var d = _c.value;
                switch (d.a.e(a.d)) {
                    case "rows":
                        b = toNullable(Number_$type, parseUInt32_1(d.d, CultureInfo.invariantCulture));
                        break;
                    case "cols":
                        c = toNullable(Number_$type, parseUInt32_1(d.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
        };
    };
    CT_DdeValues.h = function (a, b, c, d) {
        if (c === void 0) { c = toNullable(Number_$type, null); }
        if (d === void 0) { d = toNullable(Number_$type, null); }
        a.ad.p(b, null);
        var e = null;
        var f = null;
        if (c.hasValue) {
            f = "cols";
            e = c.value.toString();
            a.ad.h(f, e);
        }
        if (d.hasValue) {
            f = "rows";
            e = d.value.toString();
            a.ad.h(f, e);
        }
    };
    CT_DdeValues.prototype.setProperty = function (a, b) {
        switch (a) {
            case 1824:
                this.a.add(typeCast(CT_DdeValue.$, b));
                break;
            default: break;
        }
    };
    CT_DdeValues.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_DdeValues.$t = markType(CT_DdeValues, 'CT_DdeValues', Base.$, [ISupportSetProperty_$type]);
    return CT_DdeValues;
}(Base));
export { CT_DdeValues };
//# sourceMappingURL=CT_DdeValues.js.map