import * as tslib_1 from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxSeriesComponent } from "./igx-series-component";
import { CategoryItemHighlightType, CategoryItemHighlightType_$type } from "./CategoryItemHighlightType";
import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component";
import { CategoryItemHighlightLayer } from "./CategoryItemHighlightLayer";
import { ensureBool, ensureEnum } from "igniteui-angular-core";
/**
 * Represents an annotation layer that highlights items in a series that use a category axis
 * either by drawing a banded shape at their position, or by rendering a marker at their position.
 * Depending on the type of series, the default highlight will be affected. To override
 * the type of highlight used, you can set the HighlightType property.
*/
export var IgxCategoryItemHighlightLayerComponent_PROVIDERS = [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxCategoryItemHighlightLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxCategoryItemHighlightLayerComponent; }) }];
var IgxCategoryItemHighlightLayerComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxCategoryItemHighlightLayerComponent, _super);
    function IgxCategoryItemHighlightLayerComponent() {
        return _super.call(this) || this;
    }
    IgxCategoryItemHighlightLayerComponent_1 = IgxCategoryItemHighlightLayerComponent;
    IgxCategoryItemHighlightLayerComponent.prototype.createImplementation = function () {
        return new CategoryItemHighlightLayer();
    };
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "targetSeries", {
        /**
         * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get: function () {
            if (this.i.m7 == null) {
                return null;
            }
            if (!this.i.m7.externalObject) {
                var e = IgxSeriesComponent._createFromInternal(this.i.m7);
                if (e) {
                    e._implementation = this.i.m7;
                }
                this.i.m7.externalObject = e;
            }
            return this.i.m7.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.m7 = null : this.i.m7 = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "useInterpolation", {
        /**
         * Gets or sets whether to use value interpolation when drawing a line through the best value for the pointer position.
        */
        get: function () {
            return this.i.nb;
        },
        set: function (v) {
            this.i.nb = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "highlightType", {
        /**
         * Gets or sets which type of highlight shape to use when highlighting items.
        */
        get: function () {
            return this.i.m5;
        },
        set: function (v) {
            this.i.m5 = ensureEnum(CategoryItemHighlightType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "markerTemplate", {
        /**
         * Gets or sets the template to use for marker visuals for the current series object.
        */
        get: function () {
            return this.i.np;
        },
        set: function (v) {
            this.i.np = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "bandHighlightWidth", {
        /**
         * Gets or sets the width to use for the highlight region if highlighting items in a grid aligned series (line, spline, etc), with a banded shape.
        */
        get: function () {
            return this.i.nd;
        },
        set: function (v) {
            this.i.nd = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategoryItemHighlightLayerComponent.prototype, "skipUnknownValues", {
        /**
         * Gets or sets whether to skip unknown values when searching for series values.
        */
        get: function () {
            return this.i.na;
        },
        set: function (v) {
            this.i.na = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    IgxCategoryItemHighlightLayerComponent.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, container, component, parent);
        this._inStyling = true;
        if (this.targetSeries && this.targetSeries._styling) {
            this.targetSeries._styling(container, component, this);
        }
        this._inStyling = false;
    };
    var IgxCategoryItemHighlightLayerComponent_1;
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", IgxSeriesComponent),
        tslib_1.__metadata("design:paramtypes", [IgxSeriesComponent])
    ], IgxCategoryItemHighlightLayerComponent.prototype, "targetSeries", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxCategoryItemHighlightLayerComponent.prototype, "useInterpolation", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCategoryItemHighlightLayerComponent.prototype, "highlightType", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], IgxCategoryItemHighlightLayerComponent.prototype, "markerTemplate", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCategoryItemHighlightLayerComponent.prototype, "bandHighlightWidth", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxCategoryItemHighlightLayerComponent.prototype, "skipUnknownValues", null);
    IgxCategoryItemHighlightLayerComponent = IgxCategoryItemHighlightLayerComponent_1 = tslib_1.__decorate([
        Component({
            selector: 'igx-category-item-highlight-layer',
            template: "",
            providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxCategoryItemHighlightLayerComponent_1; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxCategoryItemHighlightLayerComponent_1; }) }],
            changeDetection: ChangeDetectionStrategy.OnPush
        }),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxCategoryItemHighlightLayerComponent);
    return IgxCategoryItemHighlightLayerComponent;
}(IgxAnnotationLayerComponent));
export { IgxCategoryItemHighlightLayerComponent };
//# sourceMappingURL=igx-category-item-highlight-layer-component.js.map