var IgxCategoryItemHighlightLayerComponent_1;
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 const IgxCategoryItemHighlightLayerComponent_PROVIDERS = [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxCategoryItemHighlightLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxCategoryItemHighlightLayerComponent) }];
let IgxCategoryItemHighlightLayerComponent = IgxCategoryItemHighlightLayerComponent_1 = class IgxCategoryItemHighlightLayerComponent extends IgxAnnotationLayerComponent {
    constructor() {
        super();
    }
    createImplementation() {
        return new CategoryItemHighlightLayer();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
    */
    get targetSeries() {
        if (this.i.m7 == null) {
            return null;
        }
        if (!this.i.m7.externalObject) {
            let e = IgxSeriesComponent._createFromInternal(this.i.m7);
            if (e) {
                e._implementation = this.i.m7;
            }
            this.i.m7.externalObject = e;
        }
        return this.i.m7.externalObject;
    }
    set targetSeries(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;
    }
    /**
     * Gets or sets whether to use value interpolation when drawing a line through the best value for the pointer position.
    */
    get useInterpolation() {
        return this.i.nb;
    }
    set useInterpolation(v) {
        this.i.nb = ensureBool(v);
    }
    /**
     * Gets or sets which type of highlight shape to use when highlighting items.
    */
    get highlightType() {
        return this.i.m5;
    }
    set highlightType(v) {
        this.i.m5 = ensureEnum(CategoryItemHighlightType_$type, v);
    }
    /**
     * Gets or sets the template to use for marker visuals for the current series object.
    */
    get markerTemplate() {
        return this.i.np;
    }
    set markerTemplate(v) {
        this.i.np = v;
    }
    /**
     * 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 bandHighlightWidth() {
        return this.i.nd;
    }
    set bandHighlightWidth(v) {
        this.i.nd = +v;
    }
    /**
     * Gets or sets whether to skip unknown values when searching for series values.
    */
    get skipUnknownValues() {
        return this.i.na;
    }
    set skipUnknownValues(v) {
        this.i.na = ensureBool(v);
    }
    _styling(container, component, parent) {
        super._styling(container, component, parent);
        this._inStyling = true;
        if (this.targetSeries && this.targetSeries._styling) {
            this.targetSeries._styling(container, component, this);
        }
        this._inStyling = false;
    }
};
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(() => IgxCategoryItemHighlightLayerComponent_1) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxCategoryItemHighlightLayerComponent_1) }],
        changeDetection: ChangeDetectionStrategy.OnPush
    }),
    tslib_1.__metadata("design:paramtypes", [])
], IgxCategoryItemHighlightLayerComponent);
export { IgxCategoryItemHighlightLayerComponent };
//# sourceMappingURL=igx-category-item-highlight-layer-component.js.map