/*
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 { StrategyBasedIndicator } from "./StrategyBasedIndicator";
import { CustomIndicatorStrategy } from "./CustomIndicatorStrategy";
import { String_$type, fromEnum, markType } from "igniteui-react-core/ES5/type";
import { FinancialEventArgs } from "./FinancialEventArgs";
import { List$1 } from "igniteui-react-core/ES5/List$1";
var CustomIndicator = /** @class */ (function (_super) {
    tslib_1.__extends(CustomIndicator, _super);
    function CustomIndicator() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.qm = null;
        _this.ql = null;
        return _this;
    }
    CustomIndicator.prototype.get_p0 = function () {
        return new CustomIndicatorStrategy();
    };
    Object.defineProperty(CustomIndicator.prototype, "p0", {
        get: function () {
            return this.get_p0();
        },
        enumerable: true,
        configurable: true
    });
    CustomIndicator.prototype.get_qd = function () {
        return CustomIndicator.$;
    };
    Object.defineProperty(CustomIndicator.prototype, "qd", {
        get: function () {
            return this.get_qd();
        },
        enumerable: true,
        configurable: true
    });
    CustomIndicator.prototype.pc = function (a, b) {
        var c = this.l8(a, b);
        var d = this.l9(c);
        var e = new List$1(String_$type, 0);
        if (this.ql != null) {
            var f = new FinancialEventArgs(c.calculateFrom, c.calculateCount, c, d, this);
            this.ql(this, f);
            if (f.basedOn != null) {
                try {
                    for (var _a = tslib_1.__values(fromEnum(f.basedOn)), _b = _a.next(); !_b.done; _b = _a.next()) {
                        var g = _b.value;
                        e.add(g);
                    }
                }
                catch (e_1_1) { e_1 = { error: e_1_1 }; }
                finally {
                    try {
                        if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
                    }
                    finally { if (e_1) throw e_1.error; }
                }
            }
        }
        return e;
        var e_1, _c;
    };
    Object.defineProperty(CustomIndicator.prototype, "indicator", {
        get: function () {
            return this.qm;
        },
        set: function (a) {
            this.qm = a;
            this.pk();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CustomIndicator.prototype, "basedOnColumns", {
        get: function () {
            return this.ql;
        },
        set: function (a) {
            this.ql = a;
        },
        enumerable: true,
        configurable: true
    });
    CustomIndicator.prototype.o9 = function (a, b) {
        _super.prototype.o9.call(this, a, b);
        if (this.qm != null) {
            var c = this.l8(a, b);
            if (b == 0) {
                return false;
            }
            if (!this.m3(this.pc(a, b))) {
                return false;
            }
            this.qm(this, new FinancialEventArgs(a, b, c, this.l9(c), this));
            if (this.p2(c) && this.mg != null) {
                this.mg.ck();
            }
            return true;
        }
        return false;
    };
    CustomIndicator.$t = markType(CustomIndicator, 'CustomIndicator', StrategyBasedIndicator.$);
    return CustomIndicator;
}(StrategyBasedIndicator));
export { CustomIndicator };
