/*
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 { IgrCategoryYAxis } from './igr-category-y-axis';
import { IgrNumericXAxis } from './igr-numeric-x-axis';
import { IgrAnchoredCategorySeries } from './igr-anchored-category-series';
import { toPoint, fromPoint, fromRect } from "igniteui-react-core/ES2015/componentUtil";
/**
 * Represents a vertically laid out category based series.
*/
export class IgrVerticalAnchoredCategorySeries extends IgrAnchoredCategorySeries {
    constructor(props) {
        super(props);
    }
    set xAxisName(value) {
        this._xAxisName = value;
    }
    get xAxisName() {
        return this._xAxisName;
    }
    set yAxisName(value) {
        this._yAxisName = value;
    }
    get yAxisName() {
        return this._yAxisName;
    }
    bindAxes(axes) {
        for (let 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];
            }
        }
    }
    get i() {
        return this._implementation;
    }
    /**
 * Gets or sets the effective x-axis for the current CategorySeries object.
*/
    get xAxis() {
        if (this.i.xAxis == null) {
            return null;
        }
        if (!this.i.xAxis.externalObject) {
            let e = new IgrNumericXAxis(null);
            e._implementation = this.i.xAxis;
            this.i.xAxis.externalObject = e;
        }
        return this.i.xAxis.externalObject;
    }
    set xAxis(v) {
        v == null ? this.i.xAxis = null : this.i.xAxis = v.i;
    }
    /**
     * Gets or sets the effective y-axis for the current CategorySeries object.
    */
    get yAxis() {
        if (this.i.yAxis == null) {
            return null;
        }
        if (!this.i.yAxis.externalObject) {
            let e = new IgrCategoryYAxis(null);
            e._implementation = this.i.yAxis;
            this.i.yAxis.externalObject = e;
        }
        return this.i.yAxis.externalObject;
    }
    set yAxis(v) {
        v == null ? this.i.yAxis = null : this.i.yAxis = v.i;
    }
    /**
     * Gets whether or not the current series is vertical series
    */
    get isVertical() {
        return this.i.isVertical;
    }
    /**
 * Returns the offset value for this series if grouped on a category axis.

*/
    getOffsetValue() {
        let iv = this.i.getOffsetValue();
        return (iv);
    }
    /**
     * Returns the width of the category grouping this series is in.
    
    */
    getCategoryWidth() {
        let iv = this.i.getCategoryWidth();
        return (iv);
    }
    getNextOrExactIndex(world, skipUnknowns) {
        let iv = this.i.e9(toPoint(world), skipUnknowns);
        return (iv);
    }
    getPreviousOrExactIndex(world, skipUnknowns) {
        let iv = this.i.fb(toPoint(world), skipUnknowns);
        return (iv);
    }
    /**
     * 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
    */
    getSeriesValueMarkerBoundingBox(world) {
        let iv = this.i.lp(toPoint(world));
        return fromRect(iv);
    }
    getSeriesValue(world, useInterpolation, skipUnknowns) {
        let iv = this.i.ek(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    }
    getSeriesValuePosition(world, useInterpolation, skipUnknowns) {
        let iv = this.i.le(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    }
    /**
     * Gets the precise item index, if possible, based on the closeness to the previous or next whole integer. If the series cannot provide this information, GetExactItemIndex will return the same integer value as GetItemIndex.
    
    * @param world  * The world position for which to return the index.
    */
    getExactItemIndex(world) {
        let iv = this.i.d8(toPoint(world));
        return (iv);
    }
    /**
     * Gets the index of the item that resides at the provided world coordinates.
    
    * @param world  * The world coordinates of the requested item.
    */
    getItemIndex(world) {
        let iv = this.i.e5(toPoint(world));
        return (iv);
    }
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    getItem(world) {
        let iv = this.i.fm(toPoint(world));
        return (iv);
    }
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    canUseAsYAxis(axis) {
        let iv = this.i.pw(axis);
        return (iv);
    }
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    canUseAsXAxis(axis) {
        let iv = this.i.pv(axis);
        return (iv);
    }
}
