/*
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, fromEnum, EnumUtil, markType } from "igniteui-angular-core";
import { ST_FormulaDirection_$type } from "./ST_FormulaDirection";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
import { stringFormat } from "igniteui-angular-core";
/**
 * @hidden
 */
var CT_Formula = /** @class */ (function (_super) {
    tslib_1.__extends(CT_Formula, _super);
    function CT_Formula() {
        var _this = _super.call(this) || this;
        _this.b = 0;
        _this.d = null;
        _this.b = 0;
        return _this;
    }
    CT_Formula.prototype.toString = function () {
        var a = null;
        if (this.b == 1) {
            a = "; (row)";
        }
        return stringFormat("Value='{0}'{1}", this.d, a);
    };
    CT_Formula.a = function (a) {
        var b;
        var c = CT_Formula.e(a, b);
        b = c.p1;
        var d = a.ab.ad;
        return ((function () {
            var $ret = new CT_Formula();
            $ret.b = b;
            $ret.d = d;
            return $ret;
        })());
    };
    CT_Formula.e = function (a, b) {
        var e_1, _a;
        b = 0;
        try {
            for (var _b = tslib_1.__values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                switch (c.a.e(a.d)) {
                    case "dir":
                        b = XmlNamespaceDefinitionBase.b(ST_FormulaDirection_$type, c.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
        };
    };
    CT_Formula.f = function (a, b, c) {
        a.ad.p(c, "cx");
        var d = null;
        var e = null;
        if (b == 1) {
            e = "dir";
            d = EnumUtil.getName(ST_FormulaDirection_$type, b);
            a.ad.h(e, d);
        }
    };
    CT_Formula.$t = markType(CT_Formula, 'CT_Formula');
    return CT_Formula;
}(Base));
export { CT_Formula };
//# sourceMappingURL=CT_Formula.js.map