/*
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 { __extends, __values } from "tslib";
import { Base, Number_$type, fromEnum, markType } from "igniteui-angular-core";
import { CondFmtWrapper } from "./CondFmtWrapper";
import { Dictionary$2 } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
/**
 * @hidden
 */
var WorksheetCFInfo = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(WorksheetCFInfo, _super);
    function WorksheetCFInfo(a) {
        var _this = _super.call(this) || this;
        _this.e = null;
        _this.g = null;
        _this.b = null;
        _this.d = null;
        _this.a = null;
        _this.d = a;
        _this.e = new Dictionary$2(Number_$type, CondFmtWrapper.$, 0);
        _this.g = new List$1(CondFmtWrapper.$, 0);
        return _this;
    }
    WorksheetCFInfo.prototype.h = function (a) {
        var _this = this;
        var b = null;
        if (a.d == 0) {
            this.g.add(a);
        }
        else if (((function () { var c = _this.e.tryGetValue(a.d, b); b = c.p1; return c.ret; })())) {
            var c = a.h ? "CONDFMT12" : "CONDFMT";
        }
        else {
            this.e.addItem(a.d, a);
        }
        this.b = a;
    };
    WorksheetCFInfo.prototype.c = function (a) {
        var _this = this;
        var b = null;
        if (((function () { var c = _this.e.tryGetValue(a, b); b = c.p1; return c.ret; })())) {
            return b;
        }
        else {
        }
        return null;
    };
    WorksheetCFInfo.prototype.f = function () {
        var e_1, _a, e_2, _b;
        var a = new List$1(CondFmtWrapper.$, 2, this.e.count);
        if (this.g != null) {
            try {
                for (var _c = __values(fromEnum(this.g)), _d = _c.next(); !_d.done; _d = _c.next()) {
                    var b = _d.value;
                    a.add(b);
                }
            }
            catch (e_1_1) {
                e_1 = { error: e_1_1 };
            }
            finally {
                try {
                    if (_d && !_d.done && (_a = _c.return))
                        _a.call(_c);
                }
                finally {
                    if (e_1)
                        throw e_1.error;
                }
            }
        }
        try {
            for (var _e = __values(fromEnum(this.e.values)), _f = _e.next(); !_f.done; _f = _e.next()) {
                var c = _f.value;
                a.add(c);
            }
        }
        catch (e_2_1) {
            e_2 = { error: e_2_1 };
        }
        finally {
            try {
                if (_f && !_f.done && (_b = _e.return))
                    _b.call(_e);
            }
            finally {
                if (e_2)
                    throw e_2.error;
            }
        }
        return a;
    };
    WorksheetCFInfo.$t = markType(WorksheetCFInfo, 'WorksheetCFInfo');
    return WorksheetCFInfo;
}(Base));
export { WorksheetCFInfo };
