import * as tslib_1 from "tslib";
var IgxItemLegendComponent_1;
import { Component, Renderer2, ElementRef, Inject, forwardRef, NgZone, ChangeDetectionStrategy } from '@angular/core';
import { DOCUMENT } from '@angular/platform-browser';
import { IgxLegendBaseComponent, LegendBaseStyles } from './igx-legend-base-component';
import { ItemLegend } from "./ItemLegend";
import { AngularRenderer } from "igniteui-angular-core/ES2015/angular-renderer";
import { DataChartStylingDefaults } from './DataChartStylingDefaults';
export const IgxItemLegendComponent_PROVIDERS = [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(() => IgxItemLegendComponent) }];
/**
 * Represents a legend that displays an item for each point in the series.
*
* You can use the `IgxItemLegendComponent` to display a legend item for each data member bound to the `IgxBubbleSeriesComponent`
*/
let IgxItemLegendComponent = IgxItemLegendComponent_1 = class IgxItemLegendComponent extends IgxLegendBaseComponent {
    constructor(renderer, elRef, document, ngZone) {
        super();
        this.renderer = renderer;
        this.elRef = elRef;
        this.document = document;
        this.ngZone = ngZone;
        this._zoneRunner = (act) => 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, this.document, this.ngZone, true, DataChartStylingDefaults);
        this._wrapper = ren;
        this.i.provideContainer(ren);
    }
    ngOnDestroy() {
        this._wrapper.destroy();
    }
    createImplementation() {
        return new ItemLegend();
    }
    get i() {
        return this._implementation;
    }
    createItemwiseLegendItems(legendItems, series) {
        this.i.createItemwiseLegendItems(legendItems, series);
    }
    exportVisualData() {
        return this.i.exportVisualData();
    }
    exportSerializedVisualData() {
        return this.i.exportSerializedVisualData();
    }
    /**
 * Gets whether or not this legend supports itemwise visuals
*/
    get isItemwise() {
        return this.i.isItemwise;
    }
};
IgxItemLegendComponent = IgxItemLegendComponent_1 = tslib_1.__decorate([
    Component({
        selector: 'igx-item-legend',
        template: ``,
        providers: [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(() => IgxItemLegendComponent_1) }],
        changeDetection: ChangeDetectionStrategy.OnPush,
        styles: LegendBaseStyles
    }),
    tslib_1.__param(2, Inject(DOCUMENT)),
    tslib_1.__metadata("design:paramtypes", [Renderer2,
        ElementRef, Object, NgZone])
], IgxItemLegendComponent);
export { IgxItemLegendComponent };
//# sourceMappingURL=igx-item-legend-component.js.map