/*
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.u7 = null;
            this.u6 = null;
        }
        get_ul() {
            return new CustomIndicatorStrategy();
        }
        get ul() {
            return this.get_ul();
        }
        get_uy() {
            return CustomIndicator.$;
        }
        get uy() {
            return this.get_uy();
        }
        tx(a, b) {
            let c = this.qt(a, b);
            let d = this.qu(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.u7;
        }
        set indicator(a) {
            this.u7 = a;
            this.t5();
        }
        get basedOnColumns() {
            return this.u6;
        }
        set basedOnColumns(a) {
            this.u6 = a;
        }
        tu(a, b) {
            super.tu(a, b);
            if (this.indicator != null) {
                let c = this.qt(a, b);
                if (b == 0) {
                    return false;
                }
                if (!this.rp(this.tx(a, b))) {
                    return false;
                }
                this.indicator(this, new FinancialEventArgs(a, b, c, this.qu(c), this));
                if (this.un(c) && this.q2 != null) {
                    this.q2.c0();
                }
                return true;
            }
            return false;
        }
    }
    CustomIndicator.$t = markType(CustomIndicator, 'CustomIndicator', StrategyBasedIndicator.$);
    return CustomIndicator;
})();
