/*
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 { __extends, __values } from "tslib";
import { Base, toNullable, Boolean_$type, fromEnum, markType, getInstanceType } from "igniteui-angular-core";
import { ST_OnOff } from "./ST_OnOff";
/**
 * @hidden
 */
var CT_NumberFormat = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CT_NumberFormat, _super);
    function CT_NumberFormat() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.d = null;
        _this.b = toNullable(Boolean_$type, null);
        return _this;
    }
    Object.defineProperty(CT_NumberFormat.prototype, "c", {
        get: function () {
            return this.d;
        },
        set: function (a) {
            this.d = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_NumberFormat.prototype, "a", {
        get: function () {
            return this.b;
        },
        set: function (a) {
            this.b = a;
        },
        enumerable: false,
        configurable: true
    });
    CT_NumberFormat.f = function (a, b, c) {
        var e_1, _a;
        b = null;
        c = toNullable(Boolean_$type, null);
        try {
            for (var _b = __values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var d = _c.value;
                switch (d.a.e(a.d)) {
                    case "formatCode":
                        b = d.d;
                        break;
                    case "sourceLinked":
                        c = toNullable(Boolean_$type, ST_OnOff.e(d.d));
                        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_NumberFormat.g = function (a, b, c, d) {
        a.ad.p(b, "cx");
        var e = null;
        var f = null;
        if (c.hasValue) {
            f = "sourceLinked";
            e = ST_OnOff.g(c.value);
            a.ad.h(f, e);
        }
        if (d != null) {
            f = "formatCode";
            e = d;
            a.ad.h(f, e);
        }
        ;
    };
    CT_NumberFormat.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_NumberFormat.$t = markType(CT_NumberFormat, 'CT_NumberFormat');
    return CT_NumberFormat;
}(Base));
export { CT_NumberFormat };
