/*
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, String_$type, fromEnum, markType } from "igniteui-angular-core";
import { CONDFMTSerializer } from "./CONDFMTSerializer";
import { List$1 } from "igniteui-angular-core";
import { Dictionary$2 } from "igniteui-angular-core";
/**
 * @hidden
 */
export class CFSerializer extends Base {
    constructor(a) {
        super();
        this.d = null;
        this.b = null;
        this.b = a;
    }
    static a(a) {
        if (a == null || a._conditionalFormats$i.count == 0) {
            return null;
        }
        let b = new CFSerializer(a);
        b.e(a._conditionalFormats$i);
        return b;
    }
    e(a) {
        let b = new Dictionary$2(String_$type, CONDFMTSerializer.$, 0);
        for (let c of fromEnum(a)) {
            let d = c._a0(1);
            let e = null;
            if (((() => { let f = b.tryGetValue(d, e); e = f.p1; return f.ret; })()) == false) {
                e = new CONDFMTSerializer();
                e.d = b.count + 1;
                e.c = c.regions;
                e.a = e.g();
                b.addItem(d, e);
            }
            e.h.add(c);
            e.e = e.h.count;
        }
        this.d = new List$1(CONDFMTSerializer.$, 2, b.count);
        for (let f of fromEnum(b.values)) {
            this.d.add(f);
        }
    }
    get c() {
        return this.d;
    }
}
CFSerializer.$t = markType(CFSerializer, 'CFSerializer');
//# sourceMappingURL=CFSerializer.js.map