/*
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 { 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
 */
export class CT_Formula extends Base {
    constructor() {
        super();
        this.b = 0;
        this.d = null;
        this.b = 0;
    }
    toString() {
        let a = null;
        if (this.b == 1) {
            a = "; (row)";
        }
        return stringFormat("Value='{0}'{1}", this.d, a);
    }
    static a(a) {
        let b;
        let c = CT_Formula.e(a, b);
        b = c.p1;
        let d = a.ab.ad;
        return ((() => {
            let $ret = new CT_Formula();
            $ret.b = b;
            $ret.d = d;
            return $ret;
        })());
    }
    static e(a, b) {
        b = 0;
        for (let c of fromEnum(a.ab.u)) {
            switch (c.a.e(a.d)) {
                case "dir":
                    b = XmlNamespaceDefinitionBase.b(ST_FormulaDirection_$type, c.d);
                    break;
                default: break;
            }
        }
        return {
            p1: b
        };
    }
    static f(a, b, c) {
        a.ad.p(c, "cx");
        let d = null;
        let 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');
//# sourceMappingURL=CT_Formula.js.map