import * as tslib_1 from "tslib";
import { forwardRef, Input } from '@angular/core';
import { IgxCategoryAxisBaseComponent } from "./igx-category-axis-base-component";
import { IgxNumericYAxisComponent } from "./igx-numeric-y-axis-component";
import { IgxAnchoredCategorySeriesComponent } from "./igx-anchored-category-series-component";
import { IgxCategorySeriesComponent } from "./igx-category-series-component";
import { IgxMarkerSeriesComponent } from "./igx-marker-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { toPoint, fromRect, fromPoint } from "igniteui-angular-core";
/**
 * Base class for anchored category series with a category x-axis and a numeric y-axis.
*
* Instantiate HorizontalAnchoredCategorySeries
*
* ```html
*  <igx-data-chart
*       [dataSource]="data"  >
* 	 <igx-column-series
*         #series
*         [xAxis]="xAxis"
*         [yAxis]="yAxis"
*         valueMemberPath="value"
*           >
*       </igx-column-series>
* </igx-data-chart>
* ```
*
* ```ts
* let series = new IgxColumnSeriesComponent();
* series.xAxis = this.xAxis;
* series.yAxis = this.yAxis;
* series.valueMemberPath="value";
* this.chart.series.add(series);
* ```
*/
export const IgxHorizontalAnchoredCategorySeriesComponent_PROVIDERS = [{ provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxHorizontalAnchoredCategorySeriesComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxHorizontalAnchoredCategorySeriesComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxHorizontalAnchoredCategorySeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxHorizontalAnchoredCategorySeriesComponent) }];
export class IgxHorizontalAnchoredCategorySeriesComponent extends IgxAnchoredCategorySeriesComponent {
    constructor() {
        super();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Gets or sets the effective x-axis for this series.
    *
    * Instantiate xAxis
    *
    * <!-- Angular -->
    *
    * ```js
    *  <igx-data-chart
    *       [dataSource]="data"  >
    * 	  <igx-category-x-axis
    *         label="label"
    *         #xAxis
    *         >
    *       </igx-category-x-axis>
    * 	 <igx-column-series
    *     ...
    *         [xAxis]="xAxis"
    *     ...
    *           >
    *       </igx-column-series>
    * </igx-data-chart>
    * ```
    *
    * ```ts
    * let series = new IgxColumnSeriesComponent();
    * series.xAxis = this.xAxis;
    * series.yAxis = this.yAxis;
    * series.valueMemberPath="value";
    * this.chart.series.add(series);
    * ```
    */
    get xAxis() {
        if (this.i.xAxis == null) {
            return null;
        }
        if (!this.i.xAxis.externalObject) {
            let e = IgxCategoryAxisBaseComponent._createFromInternal(this.i.xAxis);
            if (e) {
                e._implementation = this.i.xAxis;
            }
            this.i.xAxis.externalObject = e;
        }
        return this.i.xAxis.externalObject;
    }
    set xAxis(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.xAxis = null : this.i.xAxis = v.i;
    }
    /**
     * Gets or sets the effective y-axis for this series.
    *
    * Instantiate yAxis
    *
    * <!-- Angular -->
    *
    * ```js
    *  <igx-data-chart
    *       [dataSource]="data"  >
    * 	  <igx-numeric-y-axis
    *         minimumValue="0"
    *         #yAxis>
    *       </igx-numeric-y-axis>
    * 	 <igx-column-series
    *     ...
    *         [yAxis]="yAxis"
    *     ...
    *           >
    *       </igx-column-series>
    * </igx-data-chart>
    * ```
    *
    * ```ts
    * let series = new IgxColumnSeriesComponent();
    * series.xAxis = this.xAxis;
    * series.yAxis = this.yAxis;
    * series.valueMemberPath="value";
    * this.chart.series.add(series);
    * ```
    */
    get yAxis() {
        if (this.i.yAxis == null) {
            return null;
        }
        if (!this.i.yAxis.externalObject) {
            let e = IgxNumericYAxisComponent._createFromInternal(this.i.yAxis);
            if (e) {
                e._implementation = this.i.yAxis;
            }
            this.i.yAxis.externalObject = e;
        }
        return this.i.yAxis.externalObject;
    }
    set yAxis(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.yAxis = null : this.i.yAxis = v.i;
    }
    _styling(container, component, parent) {
        super._styling(container, component, parent);
        this._inStyling = true;
        if (this.xAxis && this.xAxis._styling) {
            this.xAxis._styling(container, component, this);
        }
        if (this.yAxis && this.yAxis._styling) {
            this.yAxis._styling(container, component, this);
        }
        this._inStyling = false;
    }
    /**
     * 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
    */
    getSeriesValueMarkerBoundingBox(world) {
        let iv = this.i.lw(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
    */
    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);
    }
    getSeriesValue(world, useInterpolation, skipUnknowns) {
        let iv = this.i.en(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    }
    getPreviousOrExactIndex(world, skipUnknowns) {
        let iv = this.i.fe(toPoint(world), skipUnknowns);
        return (iv);
    }
    getNextOrExactIndex(world, skipUnknowns) {
        let iv = this.i.fc(toPoint(world), skipUnknowns);
        return (iv);
    }
    getSeriesValuePosition(world, useInterpolation, skipUnknowns) {
        let iv = this.i.ll(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);
    */
    canUseAsXAxis(axis) {
        let iv = this.i.p6(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
    */
    canUseAsYAxis(axis) {
        let iv = this.i.p7(axis);
        return (iv);
    }
}
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", IgxCategoryAxisBaseComponent),
    tslib_1.__metadata("design:paramtypes", [IgxCategoryAxisBaseComponent])
], IgxHorizontalAnchoredCategorySeriesComponent.prototype, "xAxis", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", IgxNumericYAxisComponent),
    tslib_1.__metadata("design:paramtypes", [IgxNumericYAxisComponent])
], IgxHorizontalAnchoredCategorySeriesComponent.prototype, "yAxis", null);
//# sourceMappingURL=igx-horizontal-anchored-category-series-component.js.map