import * as tslib_1 from "tslib";
var IgxFinancialLegendComponent_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 { Legend } from "./Legend";
import { AngularRenderer } from "igniteui-angular-core/ES2015/angular-renderer";
import { DataChartStylingDefaults } from './DataChartStylingDefaults';
export const IgxFinancialLegendComponent_PROVIDERS = [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(() => IgxFinancialLegendComponent) }];
/**
 * Represents a legend that displays information about each series, most often used in financial charting.
*/
let IgxFinancialLegendComponent = IgxFinancialLegendComponent_1 = class IgxFinancialLegendComponent 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 Legend();
    }
    get i() {
        return this._implementation;
    }
    /**
 * Gets if the legend is a financial legend.
*/
    get isFinancial() {
        return this.i.isFinancial;
    }
};
IgxFinancialLegendComponent = IgxFinancialLegendComponent_1 = tslib_1.__decorate([
    Component({
        selector: 'igx-financial-legend',
        template: ``,
        providers: [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(() => IgxFinancialLegendComponent_1) }],
        changeDetection: ChangeDetectionStrategy.OnPush,
        styles: LegendBaseStyles
    }),
    tslib_1.__param(2, Inject(DOCUMENT)),
    tslib_1.__metadata("design:paramtypes", [Renderer2,
        ElementRef, Object, NgZone])
], IgxFinancialLegendComponent);
export { IgxFinancialLegendComponent };
//# sourceMappingURL=igx-financial-legend-component.js.map