/*
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/ES2015/type";
import { FinancialEventArgs } from "./FinancialEventArgs";
import { List$1 } from "igniteui-angular-core/ES2015/List$1";
/**
 * @hidden
 */
export class CustomIndicator extends StrategyBasedIndicator {
    constructor() {
        super(...arguments);
        this.qx = null;
        this.qw = null;
    }
    get_qb() {
        return new CustomIndicatorStrategy();
    }
    get qb() {
        return this.get_qb();
    }
    get_qo() {
        return CustomIndicator.$;
    }
    get qo() {
        return this.get_qo();
    }
    pn(a, b) {
        let c = this.mj(a, b);
        let d = this.mk(c);
        let e = new List$1(String_$type, 0);
        if (this.qw != null) {
            let f = new FinancialEventArgs(c.calculateFrom, c.calculateCount, c, d, this);
            this.qw(this, f);
            if (f.basedOn != null) {
                for (let g of fromEnum(f.basedOn)) {
                    e.add(g);
                }
            }
        }
        return e;
    }
    get indicator() {
        return this.qx;
    }
    set indicator(a) {
        this.qx = a;
        this.pv();
    }
    get basedOnColumns() {
        return this.qw;
    }
    set basedOnColumns(a) {
        this.qw = a;
    }
    pk(a, b) {
        super.pk(a, b);
        if (this.qx != null) {
            let c = this.mj(a, b);
            if (b == 0) {
                return false;
            }
            if (!this.ng(this.pn(a, b))) {
                return false;
            }
            this.qx(this, new FinancialEventArgs(a, b, c, this.mk(c), this));
            if (this.qd(c) && this.ms != null) {
                this.ms.ck();
            }
            return true;
        }
        return false;
    }
}
CustomIndicator.$t = markType(CustomIndicator, 'CustomIndicator', StrategyBasedIndicator.$);
//# sourceMappingURL=CustomIndicator.js.map