var IgxCategoryHighlightLayerComponent_1;
import * as tslib_1 from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxCategoryAxisBaseComponent } from "./igx-category-axis-base-component";
import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { CategoryHighlightLayer } from "./CategoryHighlightLayer";
import { ensureBool } from "igniteui-angular-core";
/**
 * Represents an annotation layer that targets a category axis, or all category axes in the chart.
 * If the axis contains any series that are aligned between major gridlines of the axis (column, waterfall, etc) this will render a shape that fills the current category.
 * Otherwise it will render a band with an adjustable thickness at the closest gridline to the pointer position.
 * Setting UseIterpolation to true will cause the x position in the latter case to become affixed to the x position of the pointer.
*/
export const IgxCategoryHighlightLayerComponent_PROVIDERS = [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxCategoryHighlightLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxCategoryHighlightLayerComponent) }];
let IgxCategoryHighlightLayerComponent = IgxCategoryHighlightLayerComponent_1 = class IgxCategoryHighlightLayerComponent extends IgxAnnotationLayerComponent {
    constructor() {
        super();
    }
    createImplementation() {
        return new CategoryHighlightLayer();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Gets or sets the axis to target this annotation to. If null, this annotation targets all category axes simultaneously.
    */
    get targetAxis() {
        if (this.i.m4 == null) {
            return null;
        }
        if (!this.i.m4.externalObject) {
            let e = IgxCategoryAxisBaseComponent._createFromInternal(this.i.m4);
            if (e) {
                e._implementation = this.i.m4;
            }
            this.i.m4.externalObject = e;
        }
        return this.i.m4.externalObject;
    }
    set targetAxis(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.m4 = null : this.i.m4 = 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.m7;
    }
    set useInterpolation(v) {
        this.i.m7 = ensureBool(v);
    }
    /**
     * Gets or sets the width to use for the highlight region if drawing a band rather than filling a category.
    */
    get bandHighlightWidth() {
        return this.i.m8;
    }
    set bandHighlightWidth(v) {
        this.i.m8 = +v;
    }
    _styling(container, component, parent) {
        super._styling(container, component, parent);
        this._inStyling = true;
        if (this.targetAxis && this.targetAxis._styling) {
            this.targetAxis._styling(container, component, this);
        }
        this._inStyling = false;
    }
};
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", IgxCategoryAxisBaseComponent),
    tslib_1.__metadata("design:paramtypes", [IgxCategoryAxisBaseComponent])
], IgxCategoryHighlightLayerComponent.prototype, "targetAxis", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Boolean),
    tslib_1.__metadata("design:paramtypes", [Boolean])
], IgxCategoryHighlightLayerComponent.prototype, "useInterpolation", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Number),
    tslib_1.__metadata("design:paramtypes", [Number])
], IgxCategoryHighlightLayerComponent.prototype, "bandHighlightWidth", null);
IgxCategoryHighlightLayerComponent = IgxCategoryHighlightLayerComponent_1 = tslib_1.__decorate([
    Component({
        selector: 'igx-category-highlight-layer',
        template: ``,
        providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxCategoryHighlightLayerComponent_1) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxCategoryHighlightLayerComponent_1) }],
        changeDetection: ChangeDetectionStrategy.OnPush
    }),
    tslib_1.__metadata("design:paramtypes", [])
], IgxCategoryHighlightLayerComponent);
export { IgxCategoryHighlightLayerComponent };
//# sourceMappingURL=igx-category-highlight-layer-component.js.map