import * as tslib_1 from "tslib";
import { Component, Renderer2, ElementRef, forwardRef, NgZone, ChangeDetectionStrategy } from '@angular/core';
import { IgxLegendBaseComponent, LegendBaseStyles } from './igx-legend-base-component';
import { Legend } from "./Legend";
import { AngularRenderer } from "igniteui-angular-core/ES5/angular-renderer";
import { DataChartStylingDefaults } from './DataChartStylingDefaults';
export var IgxFinancialLegendComponent_PROVIDERS = [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(function () { return IgxFinancialLegendComponent; }) }];
/**
 * Represents a legend that displays information about each series, most often used in financial charting.
*/
var IgxFinancialLegendComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxFinancialLegendComponent, _super);
    function IgxFinancialLegendComponent(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;
    }
    IgxFinancialLegendComponent_1 = IgxFinancialLegendComponent;
    IgxFinancialLegendComponent.prototype.ngOnDestroy = function () {
        this._wrapper.destroy();
    };
    IgxFinancialLegendComponent.prototype.createImplementation = function () {
        return new Legend();
    };
    Object.defineProperty(IgxFinancialLegendComponent.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinancialLegendComponent.prototype, "isFinancial", {
        /**
     * Gets if the legend is a financial legend.
    */
        get: function () {
            return this.i.isFinancial;
        },
        enumerable: true,
        configurable: true
    });
    var IgxFinancialLegendComponent_1;
    IgxFinancialLegendComponent = IgxFinancialLegendComponent_1 = tslib_1.__decorate([
        Component({
            selector: 'igx-financial-legend',
            template: "",
            providers: [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(function () { return IgxFinancialLegendComponent_1; }) }],
            host: { 'class': 'ig-financial-legend igx-financial-legend' },
            changeDetection: ChangeDetectionStrategy.OnPush,
            styles: LegendBaseStyles
        }),
        tslib_1.__metadata("design:paramtypes", [Renderer2,
            ElementRef,
            NgZone])
    ], IgxFinancialLegendComponent);
    return IgxFinancialLegendComponent;
}(IgxLegendBaseComponent));
export { IgxFinancialLegendComponent };
//# sourceMappingURL=igx-financial-legend-component.js.map