/*
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 { IgrNumericYAxis } from './igr-numeric-y-axis';
import { IgrAnchoredCategorySeries } from './igr-anchored-category-series';
import { toPoint, fromPoint, fromRect } from "igniteui-react-core/ES5/componentUtil";
/**
 * Base class for anchored category series with a category x-axis and a numeric y-axis.
*
* Instantiate HorizontalAnchoredCategorySeries
*/
var IgrHorizontalAnchoredCategorySeries = /** @class */ (function (_super) {
    tslib_1.__extends(IgrHorizontalAnchoredCategorySeries, _super);
    function IgrHorizontalAnchoredCategorySeries(props) {
        return _super.call(this, props) || this;
    }
    Object.defineProperty(IgrHorizontalAnchoredCategorySeries.prototype, "xAxisName", {
        get: function () {
            return this._xAxisName;
        },
        set: function (value) {
            this._xAxisName = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrHorizontalAnchoredCategorySeries.prototype, "yAxisName", {
        get: function () {
            return this._yAxisName;
        },
        set: function (value) {
            this._yAxisName = value;
        },
        enumerable: true,
        configurable: true
    });
    IgrHorizontalAnchoredCategorySeries.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(IgrHorizontalAnchoredCategorySeries.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrHorizontalAnchoredCategorySeries.prototype, "xAxis", {
        /**
     * Gets or sets the effective x-axis for this series.
    *
    * Instantiate xAxis
    */
        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(IgrHorizontalAnchoredCategorySeries.prototype, "yAxis", {
        /**
         * Gets or sets the effective y-axis for this series.
        *
        * Instantiate yAxis
        */
        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
    });
    /**
 * If possible, will return the best available value marker bounding box within the series that has the best value match for the world position provided.

* @param world  * The world coordinates for which to get a value marker bounding box for
*
* You can use the `getCategoryWidth` to get the width of the category grouping a series is in.
*
* <!-- Angular JS -->
*
*     var x = financialSeries.GetSeriesValueMarkerBoundingBox(new IgxPoint());
*
* <!-- Ignite JS -->
*
*      N/A
*/
    IgrHorizontalAnchoredCategorySeries.prototype.getSeriesValueMarkerBoundingBox = function (world) {
        var iv = this.i.lp(toPoint(world));
        return fromRect(iv);
    };
    /**
     * Returns the offset value for this series if grouped on a category axis.
    
    *
    * You can use the `getOffsetValue` to get the offset value for this series if grouped on a category axis.
    *
    * <!-- Angular JS -->
    *
    *       var g = series.getOffsetValue();
    *
    * <!-- Ignite JS -->
    *
    *      N/A
    */
    IgrHorizontalAnchoredCategorySeries.prototype.getOffsetValue = function () {
        var iv = this.i.getOffsetValue();
        return (iv);
    };
    /**
     * Returns the width of the category grouping this series is in.
    
    *
    * You can use the `getCategoryWidth` to get the width of the category grouping a series is in.
    *
    * <!-- Angular JS -->
    *
    *      var x = this.financialSeries.CanUseAsXAxis(this.xAxis);
    *
    * <!-- Ignite JS -->
    *
    *      N/A
    */
    IgrHorizontalAnchoredCategorySeries.prototype.getCategoryWidth = function () {
        var iv = this.i.getCategoryWidth();
        return (iv);
    };
    IgrHorizontalAnchoredCategorySeries.prototype.getSeriesValue = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.ek(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    };
    IgrHorizontalAnchoredCategorySeries.prototype.getPreviousOrExactIndex = function (world, skipUnknowns) {
        var iv = this.i.fb(toPoint(world), skipUnknowns);
        return (iv);
    };
    IgrHorizontalAnchoredCategorySeries.prototype.getNextOrExactIndex = function (world, skipUnknowns) {
        var iv = this.i.e9(toPoint(world), skipUnknowns);
        return (iv);
    };
    IgrHorizontalAnchoredCategorySeries.prototype.getSeriesValuePosition = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.le(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    };
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    *
    * You can use the `canUseAsXAxis` method to determine if object can be used as XAxis
    *
    * <!-- Angular JS -->
    *
    *      var x = this.financialSeries.CanUseAsXAxis(this.xAxis);
    *
    * <!-- Ignite JS -->
    *
    *      N/A
    */
    IgrHorizontalAnchoredCategorySeries.prototype.canUseAsXAxis = function (axis) {
        var iv = this.i.pz(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    *
    * You can use the `canUseAsYAxis` method to determine if object can be used as YAxis
    *
    * <!-- Ignite JS -->
    *
    *      N/A
    */
    IgrHorizontalAnchoredCategorySeries.prototype.canUseAsYAxis = function (axis) {
        var iv = this.i.p0(axis);
        return (iv);
    };
    return IgrHorizontalAnchoredCategorySeries;
}(IgrAnchoredCategorySeries));
export { IgrHorizontalAnchoredCategorySeries };
