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 var IgxHorizontalStackedSeriesBaseComponent_PROVIDERS = [{ provide: IgxStackedSeriesBaseComponent, useExisting: forwardRef(function () { return IgxHorizontalStackedSeriesBaseComponent; }) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(function () { return IgxHorizontalStackedSeriesBaseComponent; }) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(function () { return IgxHorizontalStackedSeriesBaseComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxHorizontalStackedSeriesBaseComponent; }) }];
var IgxHorizontalStackedSeriesBaseComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxHorizontalStackedSeriesBaseComponent, _super);
    function IgxHorizontalStackedSeriesBaseComponent() {
        return _super.call(this) || this;
    }
    Object.defineProperty(IgxHorizontalStackedSeriesBaseComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxHorizontalStackedSeriesBaseComponent.prototype, "xAxis", {
        /**
         * Gets or sets the effective x-axis for this series.
        */
        get: function () {
            if (this.i.xAxis == null) {
                return null;
            }
            if (!this.i.xAxis.externalObject) {
                var e = IgxCategoryAxisBaseComponent._createFromInternal(this.i.xAxis);
                if (e) {
                    e._implementation = this.i.xAxis;
                }
                this.i.xAxis.externalObject = e;
            }
            return this.i.xAxis.externalObject;
        },
        set: function (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;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxHorizontalStackedSeriesBaseComponent.prototype, "yAxis", {
        /**
         * Gets or sets the effective y-axis for this series.
        */
        get: function () {
            if (this.i.yAxis == null) {
                return null;
            }
            if (!this.i.yAxis.externalObject) {
                var e = IgxNumericYAxisComponent._createFromInternal(this.i.yAxis);
                if (e) {
                    e._implementation = this.i.yAxis;
                }
                this.i.yAxis.externalObject = e;
            }
            return this.i.yAxis.externalObject;
        },
        set: function (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;
        },
        enumerable: true,
        configurable: true
    });
    IgxHorizontalStackedSeriesBaseComponent.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, 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.
    
    */
    IgxHorizontalStackedSeriesBaseComponent.prototype.getOffsetValue = function () {
        var iv = this.i.getOffsetValue();
        return (iv);
    };
    /**
     * Returns the width of the category grouping this series is in.
    
    */
    IgxHorizontalStackedSeriesBaseComponent.prototype.getCategoryWidth = function () {
        var iv = this.i.getCategoryWidth();
        return (iv);
    };
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    IgxHorizontalStackedSeriesBaseComponent.prototype.canUseAsYAxis = function (axis) {
        var iv = this.i.px(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    IgxHorizontalStackedSeriesBaseComponent.prototype.canUseAsXAxis = function (axis) {
        var 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);
    return IgxHorizontalStackedSeriesBaseComponent;
}(IgxStackedSeriesBaseComponent));
export { IgxHorizontalStackedSeriesBaseComponent };
//# sourceMappingURL=igx-horizontal-stacked-series-base-component.js.map