import { __extends } from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxLegendBaseComponent } from './igx-legend-base-component';
import { ItemLegend } from "./ItemLegend";
import { LegendOrientation_$type } from './LegendOrientation';
import { AngularRenderer } from "igniteui-angular-core";
import { DataChartStylingDefaults } from './DataChartStylingDefaults';
import { ensureEnum } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents a legend that displays an item for each point in the series.
*
* You can use the `ItemLegend` to display a legend item for each data member bound to the `BubbleSeries`
*/
var IgxItemLegendComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxItemLegendComponent, _super);
    function IgxItemLegendComponent(renderer, elRef, ngZone) {
        var _this = _super.call(this) || this;
        _this.renderer = renderer;
        _this.elRef = elRef;
        _this.ngZone = ngZone;
        _this._zoneRunner = function (act) { return _this.ngZone.run(act); };
        _this.container = renderer.createElement("div");
        renderer.appendChild(elRef.nativeElement, _this.container);
        var root;
        root = _this.container;
        if (_this.container != null) {
            root = _this.container;
        }
        var ren = new AngularRenderer(root, _this.renderer, window.document, _this.ngZone, true, DataChartStylingDefaults);
        _this._wrapper = ren;
        _this.i.provideContainer(ren);
        return _this;
    }
    IgxItemLegendComponent.prototype.ngOnDestroy = function () {
        this._wrapper.destroy();
        this.i.provideContainer(null);
    };
    IgxItemLegendComponent.prototype.createImplementation = function () {
        return new ItemLegend();
    };
    Object.defineProperty(IgxItemLegendComponent.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    IgxItemLegendComponent.prototype.createItemwiseLegendItems = function (legendItems, series) {
        this.i.createItemwiseLegendItems(legendItems, series);
    };
    IgxItemLegendComponent.prototype.exportVisualData = function () {
        return this.i.exportVisualData();
    };
    IgxItemLegendComponent.prototype.exportSerializedVisualData = function () {
        return this.i.exportSerializedVisualData();
    };
    Object.defineProperty(IgxItemLegendComponent.prototype, "isItemwise", {
        /**
     * Gets whether or not this legend supports itemwise visuals
    */
        get: function () {
            return this.i.isItemwise;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxItemLegendComponent.prototype, "orientation", {
        /**
         * Gets or sets the current Legend object's orientation.
        */
        get: function () {
            return this.i.be;
        },
        set: function (v) {
            this.i.be = ensureEnum(LegendOrientation_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxItemLegendComponent.prototype, "textColor", {
        /**
         * Gets or sets color of text
        */
        get: function () {
            return this.i.bk;
        },
        set: function (v) {
            this.i.bk = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxItemLegendComponent.prototype, "textStyle", {
        /**
         * Gets or sets style of text.
        */
        get: function () {
            return this.i.bl;
        },
        set: function (v) {
            this.i.bl = v;
        },
        enumerable: false,
        configurable: true
    });
    IgxItemLegendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxItemLegendComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
    IgxItemLegendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxItemLegendComponent, selector: "igx-item-legend", inputs: { orientation: "orientation", textColor: "textColor", textStyle: "textStyle" }, host: { classAttribute: "ig-item-legend igx-item-legend" }, providers: [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(function () { return IgxItemLegendComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, styles: [":host {\n    display: block;\n}\n.ig-legend {\n    border: none;\n    border: var(--legend-border, none);\n    overflow: auto;\n    overflow: var(--legend-item-overflow, auto);\n}\n.ig-chart-legend-item-text {\n    vertical-align: middle;\n    vertical-align: var(--legend-item-vertical-align, middle);\n}\n.ig-chart-legend-items-list\n{\n    padding: 5px;\n    padding: var(--legend-item-padding, 5px);\n    margin: 0px;\n    margin: var(--legend-item-margin, 0px);\n    background-color: transparent;\n    background-color: var(--legend-list-background-color, transparent);\n    font: 13px \"Titillium Web\", Verdana, Arial, sans-serif;\n    font: var(--legend-item-font, 13px \"Titillium Web\", Verdana, Arial, sans-serif);\n    color: rgba(37,37,37,1.0);\n    color: var(--text-color, rgba(37,37,37,1.0));\n}\n.ig-chart-legend-item-badge, .ui-chart-legend-item-badge, canvas\n{\n    vertical-align: middle;\n    vertical-align: var(--legend-item-badge-vertical-align, middle);\n}\n.ig-chart-legend-item\n{\n    background-color: transparent;\n    background-color: var(--legend-item-background-color, transparent);\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxItemLegendComponent;
}(IgxLegendBaseComponent));
export { IgxItemLegendComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxItemLegendComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-item-legend',
                    template: "",
                    host: { 'class': 'ig-item-legend igx-item-legend' },
                    providers: [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(function () { return IgxItemLegendComponent; }) }],
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    styles: [":host {\n    display: block;\n}\n.ig-legend {\n    border: none;\n    border: var(--legend-border, none);\n    overflow: auto;\n    overflow: var(--legend-item-overflow, auto);\n}\n.ig-chart-legend-item-text {\n    vertical-align: middle;\n    vertical-align: var(--legend-item-vertical-align, middle);\n}\n.ig-chart-legend-items-list\n{\n    padding: 5px;\n    padding: var(--legend-item-padding, 5px);\n    margin: 0px;\n    margin: var(--legend-item-margin, 0px);\n    background-color: transparent;\n    background-color: var(--legend-list-background-color, transparent);\n    font: 13px \"Titillium Web\", Verdana, Arial, sans-serif;\n    font: var(--legend-item-font, 13px \"Titillium Web\", Verdana, Arial, sans-serif);\n    color: rgba(37,37,37,1.0);\n    color: var(--text-color, rgba(37,37,37,1.0));\n}\n.ig-chart-legend-item-badge, .ui-chart-legend-item-badge, canvas\n{\n    vertical-align: middle;\n    vertical-align: var(--legend-item-badge-vertical-align, middle);\n}\n.ig-chart-legend-item\n{\n    background-color: transparent;\n    background-color: var(--legend-item-background-color, transparent);\n}"]
                }]
        }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { orientation: [{
                type: Input
            }], textColor: [{
                type: Input
            }], textStyle: [{
                type: Input
            }] } });
