/*
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 * as tslib_1 from "tslib";
import { IgrNumericXAxis } from "./igr-numeric-x-axis";
import { IgrCategoryYAxis } from "./igr-category-y-axis";
import { IgrStackedSeriesBase } from "./igr-stacked-series-base";
/**
 * Base class for stacked series with a numeric x-axis and a category y-axis.
*/
var IgrVerticalStackedSeriesBase = /** @class */ (function (_super) {
    tslib_1.__extends(IgrVerticalStackedSeriesBase, _super);
    function IgrVerticalStackedSeriesBase(props) {
        return _super.call(this, props) || this;
    }
    Object.defineProperty(IgrVerticalStackedSeriesBase.prototype, "xAxisName", {
        get: function () {
            return this._xAxisName;
        },
        set: function (value) {
            this._xAxisName = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrVerticalStackedSeriesBase.prototype, "yAxisName", {
        get: function () {
            return this._yAxisName;
        },
        set: function (value) {
            this._yAxisName = value;
        },
        enumerable: true,
        configurable: true
    });
    IgrVerticalStackedSeriesBase.prototype.bindAxes = function (axes) {
        for (var i = 0; i < axes.length; i++) {
            if (axes[i].name == this.xAxisName) {
                this.xAxis = axes[i];
            }
            if (axes[i].name == this.yAxisName) {
                this.yAxis = axes[i];
            }
        }
    };
    Object.defineProperty(IgrVerticalStackedSeriesBase.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrVerticalStackedSeriesBase.prototype, "xAxis", {
        /**
     * Gets or sets the effective x-axis for the current CategorySeries object.
    */
        get: function () {
            if (this.i.xAxis == null) {
                return null;
            }
            if (!this.i.xAxis.externalObject) {
                var e = new IgrNumericXAxis(null);
                e._implementation = this.i.xAxis;
                this.i.xAxis.externalObject = e;
            }
            return this.i.xAxis.externalObject;
        },
        set: function (v) {
            v == null ? this.i.xAxis = null : this.i.xAxis = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrVerticalStackedSeriesBase.prototype, "yAxis", {
        /**
         * Gets or sets the effective y-axis for the current CategorySeries object.
        */
        get: function () {
            if (this.i.yAxis == null) {
                return null;
            }
            if (!this.i.yAxis.externalObject) {
                var e = new IgrCategoryYAxis(null);
                e._implementation = this.i.yAxis;
                this.i.yAxis.externalObject = e;
            }
            return this.i.yAxis.externalObject;
        },
        set: function (v) {
            v == null ? this.i.yAxis = null : this.i.yAxis = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrVerticalStackedSeriesBase.prototype, "isVertical", {
        /**
         * Gets whether or not the current series is vertical series
        */
        get: function () {
            return this.i.isVertical;
        },
        enumerable: true,
        configurable: true
    });
    /**
 * Returns the offset value for this series if grouped on a category axis.

*/
    IgrVerticalStackedSeriesBase.prototype.getOffsetValue = function () {
        var iv = this.i.getOffsetValue();
        return (iv);
    };
    /**
     * Returns the width of the category grouping this series is in.
    
    */
    IgrVerticalStackedSeriesBase.prototype.getCategoryWidth = function () {
        var iv = this.i.getCategoryWidth();
        return (iv);
    };
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    IgrVerticalStackedSeriesBase.prototype.canUseAsYAxis = function (axis) {
        var iv = this.i.pq(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    IgrVerticalStackedSeriesBase.prototype.canUseAsXAxis = function (axis) {
        var iv = this.i.pp(axis);
        return (iv);
    };
    return IgrVerticalStackedSeriesBase;
}(IgrStackedSeriesBase));
export { IgrVerticalStackedSeriesBase };
