/*
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.qp = null;
        this.qo = null;
    }
    get_p3() {
        return new CustomIndicatorStrategy();
    }
    get p3() {
        return this.get_p3();
    }
    get_qg() {
        return CustomIndicator.$;
    }
    get qg() {
        return this.get_qg();
    }
    pf(a, b) {
        let c = this.mb(a, b);
        let d = this.mc(c);
        let e = new List$1(String_$type, 0);
        if (this.qo != null) {
            let f = new FinancialEventArgs(c.calculateFrom, c.calculateCount, c, d, this);
            this.qo(this, f);
            if (f.basedOn != null) {
                for (let g of fromEnum(f.basedOn)) {
                    e.add(g);
                }
            }
        }
        return e;
    }
    get indicator() {
        return this.qp;
    }
    set indicator(a) {
        this.qp = a;
        this.pn();
    }
    get basedOnColumns() {
        return this.qo;
    }
    set basedOnColumns(a) {
        this.qo = a;
    }
    pc(a, b) {
        super.pc(a, b);
        if (this.qp != null) {
            let c = this.mb(a, b);
            if (b == 0) {
                return false;
            }
            if (!this.m8(this.pf(a, b))) {
                return false;
            }
            this.qp(this, new FinancialEventArgs(a, b, c, this.mc(c), this));
            if (this.p5(c) && this.mk != null) {
                this.mk.ck();
            }
            return true;
        }
        return false;
    }
}
CustomIndicator.$t = markType(CustomIndicator, 'CustomIndicator', StrategyBasedIndicator.$);
