import * as tslib_1 from "tslib";
import { forwardRef, Input } from '@angular/core';
import { toPoint, fromPoint } from "igniteui-angular-core/ES2015/componentUtil";
import { IgxCategoryAxisBaseComponent } from './igx-category-axis-base-component';
import { IgxNumericYAxisComponent } from './igx-numeric-y-axis-component';
import { IgxRangeCategorySeriesComponent } from './igx-range-category-series-component';
import { IgxCategorySeriesComponent } from './igx-category-series-component';
import { IgxMarkerSeriesComponent } from './igx-marker-series-component';
import { IgxSeriesComponent } from './igx-series-component';
export const IgxHorizontalRangeCategorySeriesComponent_PROVIDERS = [{ provide: IgxRangeCategorySeriesComponent, useExisting: forwardRef(() => IgxHorizontalRangeCategorySeriesComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxHorizontalRangeCategorySeriesComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxHorizontalRangeCategorySeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxHorizontalRangeCategorySeriesComponent) }];
/**
 * Base class for ranged category series with a category X-axis and a numeric Y-axis.
*
* Instantiate HorizontalAnchoredCategorySeries
*/
export class IgxHorizontalRangeCategorySeriesComponent extends IgxRangeCategorySeriesComponent {
    constructor() {
        super();
    }
    get i() {
        return this._implementation;
    }
    get xAxisName() {
        return this._xAxisName;
    }
    set xAxisName(value) {
        this._xAxisName = value;
    }
    get yAxisName() {
        return this._yAxisName;
    }
    set yAxisName(value) {
        this._yAxisName = value;
    }
    bindAxes(axes) {
        this._boundAxes = axes;
        var ax = this._boundAxes;
        console.log("axes to check: " + ax.length);
        for (var i = 0; i < ax.length; i++) {
            console.log("checking for: " + ax[i].name);
            if (this.xAxisName == null) {
                this.xAxis = null;
            }
            if (this.xAxisName == ax[i].name) {
                this.xAxis = ax[i];
            }
            if (this.yAxisName == null) {
                this.yAxis = null;
            }
            if (this.yAxisName == ax[i].name) {
                this.yAxis = ax[i];
            }
        }
    }
    /**
 * Gets or sets the effective x-axis for the current CategorySeries object.
*
* Instantiate xAxis
*/
    get xAxis() {
        if (this.i.xAxis == null) {
            return null;
        }
        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.
    *
    * Instantiate yAxis
    */
    get yAxis() {
        if (this.i.yAxis == null) {
            return null;
        }
        if (!this.i.yAxis.externalObject) {
            let e = new IgxNumericYAxisComponent();
            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;
    }
    /**
     * Checks if this series is a range series
    *
    * You can use the `isRange` to get the current series is a range type series.
    *
    * <!-- Angular JS -->
    *
    *       var r = this.series.isRange;
    *
    * <!-- Ignite JS -->
    *
    *      N/A
    */
    get isRange() {
        return this.i.c3;
    }
    /**
 * 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
*/
    getOffsetValue() {
        let 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
    */
    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);
    }
    getSeriesValue(world, useInterpolation, skipUnknowns) {
        let iv = this.i.ek(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    }
    getSeriesLowValue(world, useInterpolation, skipUnknowns) {
        let iv = this.i.ei(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    }
    getSeriesHighValue(world, useInterpolation, skipUnknowns) {
        let iv = this.i.eg(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    }
    getSeriesHighValuePosition(world, useInterpolation, skipUnknowns) {
        let iv = this.i.k9(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    }
    getSeriesLowValuePosition(world, useInterpolation, skipUnknowns) {
        let iv = this.i.lb(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    }
    getSeriesValuePosition(world, useInterpolation, skipUnknowns) {
        let iv = this.i.ld(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(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
    */
    canUseAsYAxis(axis) {
        let iv = this.i.o6(axis);
        return (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
    */
    canUseAsXAxis(axis) {
        let iv = this.i.o5(axis);
        return (iv);
    }
}
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", String),
    tslib_1.__metadata("design:paramtypes", [String])
], IgxHorizontalRangeCategorySeriesComponent.prototype, "xAxisName", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", String),
    tslib_1.__metadata("design:paramtypes", [String])
], IgxHorizontalRangeCategorySeriesComponent.prototype, "yAxisName", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", IgxCategoryAxisBaseComponent),
    tslib_1.__metadata("design:paramtypes", [IgxCategoryAxisBaseComponent])
], IgxHorizontalRangeCategorySeriesComponent.prototype, "xAxis", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", IgxNumericYAxisComponent),
    tslib_1.__metadata("design:paramtypes", [IgxNumericYAxisComponent])
], IgxHorizontalRangeCategorySeriesComponent.prototype, "yAxis", null);
//# sourceMappingURL=igx-horizontal-range-category-series-component.js.map