import { IgxFinancialCalculationDataSource } from './igx-financial-calculation-data-source';
import { IgxFinancialCalculationSupportingCalculations } from './igx-financial-calculation-supporting-calculations';
import { List$1 } from "igniteui-angular-core";
import { String_$type } from "igniteui-angular-core";
/**
 * Parameterizes a financial calculation event.
*/
var IgxFinancialEventArgs = /** @class */ /*@__PURE__*/ (function () {
    function IgxFinancialEventArgs() {
    }
    Object.defineProperty(IgxFinancialEventArgs.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    IgxFinancialEventArgs.prototype.onImplementationCreated = function () {
    };
    IgxFinancialEventArgs.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(IgxFinancialEventArgs.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: false,
        configurable: true
    });
    Object.defineProperty(IgxFinancialEventArgs.prototype, "position", {
        /**
     * The beginning position that should be calculated from.
    */
        get: function () {
            return this.i.position;
        },
        set: function (v) {
            this.i.position = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxFinancialEventArgs.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: false,
        configurable: true
    });
    Object.defineProperty(IgxFinancialEventArgs.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 IgxFinancialCalculationDataSource();
                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: false,
        configurable: true
    });
    Object.defineProperty(IgxFinancialEventArgs.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 IgxFinancialCalculationSupportingCalculations();
                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: false,
        configurable: true
    });
    return IgxFinancialEventArgs;
}());
export { IgxFinancialEventArgs };
//# sourceMappingURL=igx-financial-event-args.js.map
