import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxSeriesComponent } from "./igx-series-component";
import { CategoryItemHighlightType_$type } from "./CategoryItemHighlightType";
import { MarkerType_$type } from "./MarkerType";
import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component";
import { CategoryItemHighlightLayer } from "./CategoryItemHighlightLayer";
import { ensureBool, ensureEnum, brushToString, stringToBrush } from "igniteui-angular-core";
import * as i0 from "@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 let IgxCategoryItemHighlightLayerComponent = /*@__PURE__*/ (() => {
    class IgxCategoryItemHighlightLayerComponent extends IgxAnnotationLayerComponent {
        constructor() {
            super();
        }
        createImplementation() {
            return new CategoryItemHighlightLayer();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Gets whether the series is an annotation layer displayed only when hovering over the chart.
        */
        get isAnnotationHoverLayer() {
            return this.i.er;
        }
        /**
         * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get targetSeries() {
            const r = this.i.z1;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                let e = IgxSeriesComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        }
        set targetSeries(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.z1 = null : this.i.z1 = v.i;
        }
        /**
         * Gets or sets the name of the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get targetSeriesName() {
            return this.i.aaf;
        }
        set targetSeriesName(v) {
            this.i.aaf = v;
        }
        /**
         * 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.z5;
        }
        set useInterpolation(v) {
            this.i.z5 = ensureBool(v);
        }
        /**
         * Gets or sets which type of highlight shape to use when highlighting items.
        */
        get highlightType() {
            return this.i.zy;
        }
        set highlightType(v) {
            this.i.zy = ensureEnum(CategoryItemHighlightType_$type, v);
        }
        /**
         * Gets or sets which type of marker to use when highlighting items, if appropriate.
        */
        get markerType() {
            return this.i.z0;
        }
        set markerType(v) {
            this.i.z0 = ensureEnum(MarkerType_$type, v);
        }
        /**
         * Gets or sets which color to use for the marker when highlighting items, if appropriate.
        */
        get markerBrush() {
            return brushToString(this.i.aaz);
        }
        set markerBrush(v) {
            this.i.aaz = stringToBrush(v);
        }
        /**
         * Gets or sets which outline color to use for the marker when highlighting items, if appropriate.
        */
        get markerOutline() {
            return brushToString(this.i.aa0);
        }
        set markerOutline(v) {
            this.i.aa0 = stringToBrush(v);
        }
        /**
         * Gets or sets the template to use for marker visuals for the current series object.
        */
        get markerTemplate() {
            return this.i.aao;
        }
        set markerTemplate(v) {
            this.i.aao = 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.z7;
        }
        set bandHighlightWidth(v) {
            this.i.z7 = +v;
        }
        /**
         * Gets or sets whether to skip unknown values when searching for series values.
        */
        get skipUnknownValues() {
            return this.i.z4;
        }
        set skipUnknownValues(v) {
            this.i.z4 = ensureBool(v);
        }
        findByName(name) {
            var baseResult = super.findByName(name);
            if (baseResult) {
                return baseResult;
            }
            if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) {
                return this.targetSeries;
            }
            return null;
        }
        _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;
        }
    }
    IgxCategoryItemHighlightLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxCategoryItemHighlightLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxCategoryItemHighlightLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxCategoryItemHighlightLayerComponent, selector: "igx-category-item-highlight-layer", inputs: { targetSeries: "targetSeries", targetSeriesName: "targetSeriesName", useInterpolation: "useInterpolation", highlightType: "highlightType", markerType: "markerType", markerBrush: "markerBrush", markerOutline: "markerOutline", markerTemplate: "markerTemplate", bandHighlightWidth: "bandHighlightWidth", skipUnknownValues: "skipUnknownValues" }, providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxCategoryItemHighlightLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxCategoryItemHighlightLayerComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxCategoryItemHighlightLayerComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxCategoryItemHighlightLayerComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-category-item-highlight-layer',
                    template: ``,
                    providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxCategoryItemHighlightLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxCategoryItemHighlightLayerComponent) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { targetSeries: [{
                type: Input
            }], targetSeriesName: [{
                type: Input
            }], useInterpolation: [{
                type: Input
            }], highlightType: [{
                type: Input
            }], markerType: [{
                type: Input
            }], markerBrush: [{
                type: Input
            }], markerOutline: [{
                type: Input
            }], markerTemplate: [{
                type: Input
            }], bandHighlightWidth: [{
                type: Input
            }], skipUnknownValues: [{
                type: Input
            }] } });
