/*
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 { StrategyBasedIndicator } from "./StrategyBasedIndicator";
import { CustomIndicatorStrategy } from "./CustomIndicatorStrategy";
import { String_$type, fromEnum, markType } from "igniteui-angular-core";
import { FinancialEventArgs } from "./FinancialEventArgs";
import { List$1 } from "igniteui-angular-core";
/**
 * @hidden
 */
export class CustomIndicator extends StrategyBasedIndicator {
    constructor() {
        super(...arguments);
        this.qy = null;
        this.qx = null;
    }
    get_qc() {
        return new CustomIndicatorStrategy();
    }
    get qc() {
        return this.get_qc();
    }
    get_qp() {
        return CustomIndicator.$;
    }
    get qp() {
        return this.get_qp();
    }
    po(a, b) {
        let c = this.mk(a, b);
        let d = this.ml(c);
        let e = new List$1(String_$type, 0);
        if (this.qx != null) {
            let f = new FinancialEventArgs(c.calculateFrom, c.calculateCount, c, d, this);
            this.qx(this, f);
            if (f.basedOn != null) {
                for (let g of fromEnum(f.basedOn)) {
                    e.add(g);
                }
            }
        }
        return e;
    }
    get indicator() {
        return this.qy;
    }
    set indicator(a) {
        this.qy = a;
        this.pw();
    }
    get basedOnColumns() {
        return this.qx;
    }
    set basedOnColumns(a) {
        this.qx = a;
    }
    pl(a, b) {
        super.pl(a, b);
        if (this.qy != null) {
            let c = this.mk(a, b);
            if (b == 0) {
                return false;
            }
            if (!this.nh(this.po(a, b))) {
                return false;
            }
            this.qy(this, new FinancialEventArgs(a, b, c, this.ml(c), this));
            if (this.qe(c) && this.mt != null) {
                this.mt.cl();
            }
            return true;
        }
        return false;
    }
}
CustomIndicator.$t = markType(CustomIndicator, 'CustomIndicator', StrategyBasedIndicator.$);
//# sourceMappingURL=CustomIndicator.js.map