/*
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, 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
 */
export let CT_ConditionalFormatting = /*@__PURE__*/ (() => {
    class CT_ConditionalFormatting extends Base {
        constructor() {
            super();
            this.e = null;
            this.a = null;
            this.d = false;
            this.b = null;
            this.e = new List$1(CT_CfRule.$, 0);
        }
        static g(a, b, c) {
            b = false;
            c = null;
            for (let d of fromEnum(a.ab.u)) {
                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;
                }
            }
            return {
                p1: b,
                p2: c
            };
        }
        static h(a, b, c, d) {
            a.ad.p(b, null);
            let e = null;
            let 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);
            }
        }
        setProperty(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;
            }
        }
        toString() {
            let a = getInstanceType(this);
            return a != null ? a.typeName : super.toString();
        }
    }
    CT_ConditionalFormatting.$t = markType(CT_ConditionalFormatting, 'CT_ConditionalFormatting', Base.$, [ISupportSetProperty_$type]);
    return CT_ConditionalFormatting;
})();
