/*
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, typeCast, markType, getInstanceType } from "igniteui-angular-core";
import { ISupportSetProperty_$type } from "./ISupportSetProperty";
import { List$1 } from "igniteui-angular-core";
import { CT_CfRule } from "./CT_CfRule";
import { CT_ExtensionList } from "./CT_ExtensionList";
import { ST_Sqref } from "./ST_Sqref";
import { ST_OnOff } from "./ST_OnOff";
/**
 * @hidden
 */
var CT_ConditionalFormatting = /** @class */ (function (_super) {
    tslib_1.__extends(CT_ConditionalFormatting, _super);
    function CT_ConditionalFormatting() {
        var _this = _super.call(this) || this;
        _this.e = null;
        _this.a = null;
        _this.d = false;
        _this.b = null;
        _this.e = new List$1(CT_CfRule.$, 0);
        return _this;
    }
    CT_ConditionalFormatting.g = function (a, b, c) {
        var e_1, _a;
        b = false;
        c = 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 "pivot":
                        b = ST_OnOff.e(d.d);
                        break;
                    case "sqref":
                        c = ST_Sqref.a(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_ConditionalFormatting.h = function (a, b, c, d) {
        a.ad.p(b, null);
        var e = null;
        var f = null;
        f = "pivot";
        e = ST_OnOff.g(c);
        a.ad.h(f, e);
        if (d != null) {
            f = "sqref";
            e = d.e();
            a.ad.h(f, e);
        }
    };
    CT_ConditionalFormatting.prototype.setProperty = function (a, b) {
        switch (a) {
            case 251:
                this.e.add(typeCast(CT_CfRule.$, b));
                break;
            case 601:
                this.a = typeCast(CT_ExtensionList.$, b);
                break;
            default: break;
        }
    };
    CT_ConditionalFormatting.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_ConditionalFormatting.$t = markType(CT_ConditionalFormatting, 'CT_ConditionalFormatting', Base.$, [ISupportSetProperty_$type]);
    return CT_ConditionalFormatting;
}(Base));
export { CT_ConditionalFormatting };
//# sourceMappingURL=CT_ConditionalFormatting.js.map