/*
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 let CustomIndicator = /*@__PURE__*/ (() => {
    class CustomIndicator extends StrategyBasedIndicator {
        constructor() {
            super(...arguments);
            this.vb = null;
            this.va = null;
        }
        get_up() {
            return new CustomIndicatorStrategy();
        }
        get up() {
            return this.get_up();
        }
        get_u2() {
            return CustomIndicator.$;
        }
        get u2() {
            return this.get_u2();
        }
        t1(a, b) {
            let c = this.qx(a, b);
            let d = this.qy(c);
            let e = new List$1(String_$type, 0);
            if (this.basedOnColumns != null) {
                let f = new FinancialEventArgs(c.calculateFrom, c.calculateCount, c, d, this);
                this.basedOnColumns(this, f);
                if (f.basedOn != null) {
                    for (let g of fromEnum(f.basedOn)) {
                        e.add(g);
                    }
                }
            }
            return e;
        }
        get indicator() {
            return this.vb;
        }
        set indicator(a) {
            this.vb = a;
            this.t9();
        }
        get basedOnColumns() {
            return this.va;
        }
        set basedOnColumns(a) {
            this.va = a;
        }
        ty(a, b) {
            super.ty(a, b);
            if (this.indicator != null) {
                let c = this.qx(a, b);
                if (b == 0) {
                    return false;
                }
                if (!this.rt(this.t1(a, b))) {
                    return false;
                }
                this.indicator(this, new FinancialEventArgs(a, b, c, this.qy(c), this));
                if (this.ur(c) && this.q6 != null) {
                    this.q6.c0();
                }
                return true;
            }
            return false;
        }
    }
    CustomIndicator.$t = markType(CustomIndicator, 'CustomIndicator', StrategyBasedIndicator.$);
    return CustomIndicator;
})();
