/*
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-react-core/ES2015/type";
import { FinancialEventArgs } from "./FinancialEventArgs";
import { List$1 } from "igniteui-react-core/ES2015/List$1";
export class CustomIndicator extends StrategyBasedIndicator {
    constructor() {
        super(...arguments);
        this.qm = null;
        this.ql = null;
    }
    get_p0() {
        return new CustomIndicatorStrategy();
    }
    get p0() {
        return this.get_p0();
    }
    get_qd() {
        return CustomIndicator.$;
    }
    get qd() {
        return this.get_qd();
    }
    pc(a, b) {
        let c = this.l8(a, b);
        let d = this.l9(c);
        let e = new List$1(String_$type, 0);
        if (this.ql != null) {
            let f = new FinancialEventArgs(c.calculateFrom, c.calculateCount, c, d, this);
            this.ql(this, f);
            if (f.basedOn != null) {
                for (let g of fromEnum(f.basedOn)) {
                    e.add(g);
                }
            }
        }
        return e;
    }
    get indicator() {
        return this.qm;
    }
    set indicator(a) {
        this.qm = a;
        this.pk();
    }
    get basedOnColumns() {
        return this.ql;
    }
    set basedOnColumns(a) {
        this.ql = a;
    }
    o9(a, b) {
        super.o9(a, b);
        if (this.qm != null) {
            let 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.$);
