/*
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-angular-core/ES5/type";
import { FinancialEventArgs } from "./FinancialEventArgs";
import { List$1 } from "igniteui-angular-core/ES5/List$1";
/**
 * @hidden
 */
var CustomIndicator = /** @class */ (function (_super) {
    tslib_1.__extends(CustomIndicator, _super);
    function CustomIndicator() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.qq = null;
        _this.qp = null;
        return _this;
    }
    CustomIndicator.prototype.get_p4 = function () {
        return new CustomIndicatorStrategy();
    };
    Object.defineProperty(CustomIndicator.prototype, "p4", {
        get: function () {
            return this.get_p4();
        },
        enumerable: true,
        configurable: true
    });
    CustomIndicator.prototype.get_qh = function () {
        return CustomIndicator.$;
    };
    Object.defineProperty(CustomIndicator.prototype, "qh", {
        get: function () {
            return this.get_qh();
        },
        enumerable: true,
        configurable: true
    });
    CustomIndicator.prototype.pg = function (a, b) {
        var e_1, _a;
        var c = this.mc(a, b);
        var d = this.md(c);
        var e = new List$1(String_$type, 0);
        if (this.qp != null) {
            var f = new FinancialEventArgs(c.calculateFrom, c.calculateCount, c, d, this);
            this.qp(this, f);
            if (f.basedOn != null) {
                try {
                    for (var _b = tslib_1.__values(fromEnum(f.basedOn)), _c = _b.next(); !_c.done; _c = _b.next()) {
                        var g = _c.value;
                        e.add(g);
                    }
                }
                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 e;
    };
    Object.defineProperty(CustomIndicator.prototype, "indicator", {
        get: function () {
            return this.qq;
        },
        set: function (a) {
            this.qq = a;
            this.po();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CustomIndicator.prototype, "basedOnColumns", {
        get: function () {
            return this.qp;
        },
        set: function (a) {
            this.qp = a;
        },
        enumerable: true,
        configurable: true
    });
    CustomIndicator.prototype.pd = function (a, b) {
        _super.prototype.pd.call(this, a, b);
        if (this.qq != null) {
            var c = this.mc(a, b);
            if (b == 0) {
                return false;
            }
            if (!this.m9(this.pg(a, b))) {
                return false;
            }
            this.qq(this, new FinancialEventArgs(a, b, c, this.md(c), this));
            if (this.p6(c) && this.ml != null) {
                this.ml.ck();
            }
            return true;
        }
        return false;
    };
    CustomIndicator.$t = markType(CustomIndicator, 'CustomIndicator', StrategyBasedIndicator.$);
    return CustomIndicator;
}(StrategyBasedIndicator));
export { CustomIndicator };
//# sourceMappingURL=CustomIndicator.js.map