import { FinancialCalculationDataSource } from './igr-financial-calculation-data-source';
import { FinancialCalculationSupportingCalculations } from './igr-financial-calculation-supporting-calculations';
import { List$1 } from "igniteui-react-core/ES5/List$1";
import { String_$type } from "igniteui-react-core/ES5/type";
/**
 * Parameterizes a financial calculation event.
*/
var FinancialEventArgs = /** @class */ (function () {
    function FinancialEventArgs() {
    }
    Object.defineProperty(FinancialEventArgs.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    FinancialEventArgs.prototype.onImplementationCreated = function () {
    };
    FinancialEventArgs.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(FinancialEventArgs.prototype, "basedOn", {
        get: function () {
            var ret = null;
            if (this.i.basedOn) {
                ret = [];
                for (var i = 0; i < this.i.basedOn.count; i++) {
                    ret.push(this.i.basedOn[i]);
                }
            }
            return ret;
        },
        set: function (v) {
            if (!v) {
                this.i.basedOn = null;
                return;
            }
            var list = new List$1(String_$type, 0);
            for (var i = 0; i < v.length; i++) {
                list.add(v[i]);
            }
            this.i.basedOn = list;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "position", {
        /**
     * The beginning position that should be calculated from.
    */
        get: function () {
            return this.i.position;
        },
        set: function (v) {
            this.i.position = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "count", {
        /**
         * The number of positions that should be calculated from the start.
        */
        get: function () {
            return this.i.count;
        },
        set: function (v) {
            this.i.count = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "dataSource", {
        /**
         * The data to use for the calculation.
        */
        get: function () {
            if (this.i.dataSource == null) {
                return null;
            }
            if (!this.i.dataSource.externalObject) {
                var e = new FinancialCalculationDataSource();
                e._implementation = this.i.dataSource;
                this.i.dataSource.externalObject = e;
            }
            return this.i.dataSource.externalObject;
        },
        set: function (v) {
            v == null ? this.i.dataSource = null : this.i.dataSource = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "supportingCalculations", {
        /**
         * The supporting calculations to use in the calculation.
        */
        get: function () {
            if (this.i.supportingCalculations == null) {
                return null;
            }
            if (!this.i.supportingCalculations.externalObject) {
                var e = new FinancialCalculationSupportingCalculations();
                e._implementation = this.i.supportingCalculations;
                this.i.supportingCalculations.externalObject = e;
            }
            return this.i.supportingCalculations.externalObject;
        },
        set: function (v) {
            v == null ? this.i.supportingCalculations = null : this.i.supportingCalculations = v.i;
        },
        enumerable: true,
        configurable: true
    });
    return FinancialEventArgs;
}());
export { FinancialEventArgs };
