import * as tslib_1 from "tslib";
import { IgrNumericYAxis } from "./igr-numeric-y-axis";
import { IgrRangeCategorySeries } from "./igr-range-category-series";
import { toPoint, fromPoint } from "igniteui-react-core/ES5/componentUtil";
/**
 * Base class for ranged category series with a category X-axis and a numeric Y-axis.
*/
var IgrHorizontalRangeCategorySeries = /** @class */ (function (_super) {
    tslib_1.__extends(IgrHorizontalRangeCategorySeries, _super);
    function IgrHorizontalRangeCategorySeries(props) {
        return _super.call(this, props) || this;
    }
    Object.defineProperty(IgrHorizontalRangeCategorySeries.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrHorizontalRangeCategorySeries.prototype, "xAxis", {
        /**
         * Gets or sets the effective x-axis for the current CategorySeries object.
        */
        get: function () {
            if (this.i.xAxis == null) {
                return null;
            }
            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(IgrHorizontalRangeCategorySeries.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 IgrNumericYAxis(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(IgrHorizontalRangeCategorySeries.prototype, "isRange", {
        /**
         * Checks if this series is a range series
        */
        get: function () {
            return this.i.c2;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Returns the offset value for this series if grouped on a category axis.
    
    */
    IgrHorizontalRangeCategorySeries.prototype.getOffsetValue = function () {
        var iv = this.i.getOffsetValue();
        return (iv);
    };
    /**
     * Returns the width of the category grouping this series is in.
    
    */
    IgrHorizontalRangeCategorySeries.prototype.getCategoryWidth = function () {
        var iv = this.i.getCategoryWidth();
        return (iv);
    };
    IgrHorizontalRangeCategorySeries.prototype.getNextOrExactIndex = function (world, skipUnknowns) {
        var iv = this.i.e6(toPoint(world), skipUnknowns);
        return (iv);
    };
    IgrHorizontalRangeCategorySeries.prototype.getPreviousOrExactIndex = function (world, skipUnknowns) {
        var iv = this.i.e8(toPoint(world), skipUnknowns);
        return (iv);
    };
    IgrHorizontalRangeCategorySeries.prototype.getSeriesValue = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.eh(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    };
    IgrHorizontalRangeCategorySeries.prototype.getSeriesLowValue = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.ef(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    };
    IgrHorizontalRangeCategorySeries.prototype.getSeriesHighValue = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.ed(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    };
    IgrHorizontalRangeCategorySeries.prototype.getSeriesHighValuePosition = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.k5(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    };
    IgrHorizontalRangeCategorySeries.prototype.getSeriesLowValuePosition = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.k7(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    };
    IgrHorizontalRangeCategorySeries.prototype.getSeriesValuePosition = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.k9(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    };
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    IgrHorizontalRangeCategorySeries.prototype.canUseAsYAxis = function (axis) {
        var iv = this.i.o3(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    IgrHorizontalRangeCategorySeries.prototype.canUseAsXAxis = function (axis) {
        var iv = this.i.o2(axis);
        return (iv);
    };
    return IgrHorizontalRangeCategorySeries;
}(IgrRangeCategorySeries));
export { IgrHorizontalRangeCategorySeries };
