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 { IgxStackedSeriesBaseComponent } from "./igx-stacked-series-base-component";
import { IgxCategorySeriesComponent } from "./igx-category-series-component";
import { IgxMarkerSeriesComponent } from "./igx-marker-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
/**
 * Base class for stacked series with a category x-axis and a numeric y-axis.
*/
export const IgxHorizontalStackedSeriesBaseComponent_PROVIDERS = [{ provide: IgxStackedSeriesBaseComponent, useExisting: forwardRef(() => IgxHorizontalStackedSeriesBaseComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxHorizontalStackedSeriesBaseComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxHorizontalStackedSeriesBaseComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxHorizontalStackedSeriesBaseComponent) }];
export class IgxHorizontalStackedSeriesBaseComponent extends IgxStackedSeriesBaseComponent {
    constructor() {
        super();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Gets or sets the effective x-axis for this 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.
    */
    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;
    }
    /**
     * 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);
    }
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    canUseAsYAxis(axis) {
        let iv = this.i.px(axis);
        return (iv);
    }
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    canUseAsXAxis(axis) {
        let iv = this.i.pw(axis);
        return (iv);
    }
}
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", IgxCategoryAxisBaseComponent),
    tslib_1.__metadata("design:paramtypes", [IgxCategoryAxisBaseComponent])
], IgxHorizontalStackedSeriesBaseComponent.prototype, "xAxis", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", IgxNumericYAxisComponent),
    tslib_1.__metadata("design:paramtypes", [IgxNumericYAxisComponent])
], IgxHorizontalStackedSeriesBaseComponent.prototype, "yAxis", null);
//# sourceMappingURL=igx-horizontal-stacked-series-base-component.js.map