import { Component, forwardRef, ChangeDetectionStrategy } from '@angular/core';
import { IgxLegendBaseComponent } from './igx-legend-base-component';
import { Legend } from "./Legend";
import { AngularRenderer } from "igniteui-angular-core";
import { DataChartStylingDefaults } from './DataChartStylingDefaults';
import * as i0 from "@angular/core";
/**
 * Represents a legend that displays information about each series, most often used in financial charting.
*/
export let IgxFinancialLegendComponent = /*@__PURE__*/ (() => {
    class IgxFinancialLegendComponent extends IgxLegendBaseComponent {
        constructor(renderer, elRef, ngZone) {
            super();
            this.renderer = renderer;
            this.elRef = elRef;
            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, window.document, this.ngZone, true, DataChartStylingDefaults);
            this._wrapper = ren;
            this.i.provideContainer(ren);
        }
        ngOnDestroy() {
            this._wrapper.destroy();
            this.i.provideContainer(null);
        }
        createImplementation() {
            return new Legend();
        }
        get i() {
            return this._implementation;
        }
        /**
     * Gets if the legend is a financial legend.
    */
        get isFinancial() {
            return this.i.isFinancial;
        }
    }
    IgxFinancialLegendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxFinancialLegendComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
    IgxFinancialLegendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxFinancialLegendComponent, selector: "igx-financial-legend", host: { classAttribute: "ig-financial-legend igx-financial-legend" }, providers: [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(() => IgxFinancialLegendComponent) }], 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    font: 12px Verdana, Arial, sans-serif;\n    font: var(--legend-item-font, 12px Verdana, Arial, sans-serif);\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}\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 IgxFinancialLegendComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxFinancialLegendComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-financial-legend',
                    template: ``,
                    providers: [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(() => IgxFinancialLegendComponent) }],
                    host: { 'class': 'ig-financial-legend igx-financial-legend' },
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    styles: [`:host {
    display: block;
}
.ig-legend {
    border: none;
    border: var(--legend-border, none);
    overflow: auto;
    overflow: var(--legend-item-overflow, auto);
}
.ig-chart-legend-item-text {
    font: 12px Verdana, Arial, sans-serif;
    font: var(--legend-item-font, 12px Verdana, Arial, sans-serif);
    vertical-align: middle;
    vertical-align: var(--legend-item-vertical-align, middle);
}
.ig-chart-legend-items-list
{
    padding: 5px;
    padding: var(--legend-item-padding, 5px);
    margin: 0px;
    margin: var(--legend-item-margin, 0px);
    background-color: transparent;
    background-color: var(--legend-list-background-color, transparent);
}
.ig-chart-legend-item-badge, .ui-chart-legend-item-badge canvas
{
    vertical-align: middle;
    vertical-align: var(--legend-item-badge-vertical-align, middle);
}
.ig-chart-legend-item
{
    background-color: transparent;
    background-color: var(--legend-item-background-color, transparent);
}`]
                }]
        }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
