import { Component, Input, Output } from "@angular/core";
import { PageElement } from "../page-element";
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
// Note: Chart would be an example for a custom path element contributed by a path user
export class ChartComponent {
    ngAfterViewInit() {
        this.chart.load((data) => {
            this.chart.data = data;
        });
    }
}
ChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: ChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
ChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: ChartComponent, selector: "path-radar-chart", inputs: { chart: "chart" }, outputs: { chart: "chart" }, ngImport: i0, template: "<div *ngIf=\"chart.data != null\">\r\n\t<div class=\"panel panel-default\">\r\n\t\t<div class=\"panel-heading\">\r\n\t\t\t<h3 class=\"panel-title\">{{chart.data?.name}}</h3>\r\n\t\t</div>\r\n\t\t<div class=\"panel-body\">\r\n\t\t\t<p>{{chart.data?.customer}}</p>\r\n\t\t\t<p *ngIf=\"chart.data?.referenceProjectCount >= 0\">{{chart.translationService.getText(\"ReferencedProjects\")}}: {{chart.data?.referenceProjectCount}}</p>\r\n\t\t</div>\r\n\r\n\t\t<table *ngIf=\"chart.data?.interviewees?.list.length > 0\" class=\"table\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th>{{chart.translationService.getText(\"Salutation\")}}<th>\r\n\t\t\t\t<th>{{chart.translationService.getText(\"Interviewees\")}}<th>\r\n\t\t\t\t<th>{{chart.translationService.getText(\"EmploymentTitle\")}}<th>\r\n\t\t\t</tr>\r\n\t\t\t<tr *ngFor=\"let interviewee of chart.data?.interviewees?.list\">\r\n\t\t\t\t<td>{{interviewee.salutation}}<td>\r\n\t\t\t\t<td>{{interviewee.name}}<td>\r\n\t\t\t\t<td>{{interviewee.employmentTitle}}<td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\t</div>\r\n\r\n\t<div class=\"panel panel-default\" *ngFor=\"let category of chart.data?.categoryResults?.list\" width=\"100%\">\r\n\t\t<div class=\"panel-heading\">\r\n\t\t\t<h3 class=\"panel-title\">{{category.name}}</h3>\r\n\t\t</div>\r\n\t\t<div class=\"panel-body\">\r\n\t\t\t<p align=\"center\">\r\n\t\t\t\t<img *ngIf=\"category.spider != null\" width=\"600\" src=\"data:image/png;base64,{{category.spider}}\"/>\r\n\t\t\t\t<img *ngIf=\"category.stackedBar != null\" width=\"600\" src=\"data:image/png;base64,{{category.stackedBar}}\"/>\r\n\t\t\t</p>\r\n\t\t</div>\r\n\t\t<table class=\"table\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th class=\"col-md-9\">{{chart.translationService.getText(\"Question\")}}<th>\r\n\t\t\t\t<th class=\"col-md-1 text-right\">{{chart.translationService.getText(\"Actual\")}}<th>\r\n\t\t\t\t<th class=\"col-md-1 text-right\">{{chart.translationService.getText(\"Target\")}}<th>\r\n\t\t\t\t<th class=\"col-md-1 text-right\">Gap<th>\r\n\t\t\t</tr>\r\n\t\t\t<tr *ngFor=\"let question of category.questions.list\">\r\n\t\t\t\t<td>{{question.name}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{question.actualValue}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{question.targetValue}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{question.gap}}<td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\r\n\t</div>\r\n\r\n\t<div *ngIf=\"chart.data?.notCalculatedKPIs?.list.length > 0\" class=\"panel panel-default\" width=\"100%\">\r\n\t\t<div class=\"panel-heading\">\r\n\t\t\t<h3 class=\"panel-title\">Not calculated KPIs</h3>\r\n\t\t</div>\r\n\t\t<table class=\"table\">\r\n\t\t\t<tr *ngFor=\"let kpi of chart.data?.notCalculatedKPIs?.list\">\r\n\t\t\t\t<td>{{kpi.name}}<td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\r\n\t</div>\r\n\r\n\t<div class=\"panel panel-default\" *ngFor=\"let kpi of chart.data?.calculatedKPIs?.list\" width=\"100%\">\r\n\t\t<div class=\"panel-heading\">\r\n\t\t\t<h3 class=\"panel-title\">{{kpi.name}}</h3>\r\n\t\t</div>\r\n\t\t<div class=\"panel-body\">\r\n\t\t\t<p align=\"center\">\r\n\t\t\t\t<img width=\"300\" src=\"data:image/png;base64,{{kpi.dial}}\"/>\r\n\t\t\t</p>\r\n\t\t</div>\r\n\t\t<table class=\"table\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th class=\"col-md-8\" >KPI<th>\r\n\t\t\t\t<th class=\"col-md-1\" class=\"text-right\">\r\n\t\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Maximum'\">{{chart.translationService.getText(\"WorstValue\")}}</span>\r\n\t\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Minimum'\">{{chart.translationService.getText(\"BestValue\")}}</span>\r\n\t\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Neutral'\">Min</span>\r\n\t\t\t\t<th>\r\n\t\t\t\t<th class=\"col-md-1\" class=\"text-right\">{{chart.translationService.getText(\"OwnValue\")}}<th>\r\n\t\t\t\t<th class=\"col-md-1\" class=\"text-right\">\r\n\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Maximum'\">{{chart.translationService.getText(\"BestValue\")}}</span>\r\n\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Minimum'\">{{chart.translationService.getText(\"WorstValue\")}}</span>\r\n\t\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Neutral'\">Max</span>\r\n\t\t\t\t<th>\r\n\t\t\t\t<th class=\"col-md-1\" class=\"text-right\">Ranking<th>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>{{kpi.name}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{kpi.min}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{kpi.value}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{kpi.max}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{kpi.ranking}}<td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\r\n\t</div>\r\n\r\n</div>", directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: ChartComponent, decorators: [{
            type: Component,
            args: [{ selector: "path-radar-chart", template: "<div *ngIf=\"chart.data != null\">\r\n\t<div class=\"panel panel-default\">\r\n\t\t<div class=\"panel-heading\">\r\n\t\t\t<h3 class=\"panel-title\">{{chart.data?.name}}</h3>\r\n\t\t</div>\r\n\t\t<div class=\"panel-body\">\r\n\t\t\t<p>{{chart.data?.customer}}</p>\r\n\t\t\t<p *ngIf=\"chart.data?.referenceProjectCount >= 0\">{{chart.translationService.getText(\"ReferencedProjects\")}}: {{chart.data?.referenceProjectCount}}</p>\r\n\t\t</div>\r\n\r\n\t\t<table *ngIf=\"chart.data?.interviewees?.list.length > 0\" class=\"table\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th>{{chart.translationService.getText(\"Salutation\")}}<th>\r\n\t\t\t\t<th>{{chart.translationService.getText(\"Interviewees\")}}<th>\r\n\t\t\t\t<th>{{chart.translationService.getText(\"EmploymentTitle\")}}<th>\r\n\t\t\t</tr>\r\n\t\t\t<tr *ngFor=\"let interviewee of chart.data?.interviewees?.list\">\r\n\t\t\t\t<td>{{interviewee.salutation}}<td>\r\n\t\t\t\t<td>{{interviewee.name}}<td>\r\n\t\t\t\t<td>{{interviewee.employmentTitle}}<td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\t</div>\r\n\r\n\t<div class=\"panel panel-default\" *ngFor=\"let category of chart.data?.categoryResults?.list\" width=\"100%\">\r\n\t\t<div class=\"panel-heading\">\r\n\t\t\t<h3 class=\"panel-title\">{{category.name}}</h3>\r\n\t\t</div>\r\n\t\t<div class=\"panel-body\">\r\n\t\t\t<p align=\"center\">\r\n\t\t\t\t<img *ngIf=\"category.spider != null\" width=\"600\" src=\"data:image/png;base64,{{category.spider}}\"/>\r\n\t\t\t\t<img *ngIf=\"category.stackedBar != null\" width=\"600\" src=\"data:image/png;base64,{{category.stackedBar}}\"/>\r\n\t\t\t</p>\r\n\t\t</div>\r\n\t\t<table class=\"table\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th class=\"col-md-9\">{{chart.translationService.getText(\"Question\")}}<th>\r\n\t\t\t\t<th class=\"col-md-1 text-right\">{{chart.translationService.getText(\"Actual\")}}<th>\r\n\t\t\t\t<th class=\"col-md-1 text-right\">{{chart.translationService.getText(\"Target\")}}<th>\r\n\t\t\t\t<th class=\"col-md-1 text-right\">Gap<th>\r\n\t\t\t</tr>\r\n\t\t\t<tr *ngFor=\"let question of category.questions.list\">\r\n\t\t\t\t<td>{{question.name}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{question.actualValue}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{question.targetValue}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{question.gap}}<td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\r\n\t</div>\r\n\r\n\t<div *ngIf=\"chart.data?.notCalculatedKPIs?.list.length > 0\" class=\"panel panel-default\" width=\"100%\">\r\n\t\t<div class=\"panel-heading\">\r\n\t\t\t<h3 class=\"panel-title\">Not calculated KPIs</h3>\r\n\t\t</div>\r\n\t\t<table class=\"table\">\r\n\t\t\t<tr *ngFor=\"let kpi of chart.data?.notCalculatedKPIs?.list\">\r\n\t\t\t\t<td>{{kpi.name}}<td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\r\n\t</div>\r\n\r\n\t<div class=\"panel panel-default\" *ngFor=\"let kpi of chart.data?.calculatedKPIs?.list\" width=\"100%\">\r\n\t\t<div class=\"panel-heading\">\r\n\t\t\t<h3 class=\"panel-title\">{{kpi.name}}</h3>\r\n\t\t</div>\r\n\t\t<div class=\"panel-body\">\r\n\t\t\t<p align=\"center\">\r\n\t\t\t\t<img width=\"300\" src=\"data:image/png;base64,{{kpi.dial}}\"/>\r\n\t\t\t</p>\r\n\t\t</div>\r\n\t\t<table class=\"table\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th class=\"col-md-8\" >KPI<th>\r\n\t\t\t\t<th class=\"col-md-1\" class=\"text-right\">\r\n\t\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Maximum'\">{{chart.translationService.getText(\"WorstValue\")}}</span>\r\n\t\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Minimum'\">{{chart.translationService.getText(\"BestValue\")}}</span>\r\n\t\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Neutral'\">Min</span>\r\n\t\t\t\t<th>\r\n\t\t\t\t<th class=\"col-md-1\" class=\"text-right\">{{chart.translationService.getText(\"OwnValue\")}}<th>\r\n\t\t\t\t<th class=\"col-md-1\" class=\"text-right\">\r\n\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Maximum'\">{{chart.translationService.getText(\"BestValue\")}}</span>\r\n\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Minimum'\">{{chart.translationService.getText(\"WorstValue\")}}</span>\r\n\t\t\t\t\t<span *ngIf=\"kpi.optimalValue == 'Neutral'\">Max</span>\r\n\t\t\t\t<th>\r\n\t\t\t\t<th class=\"col-md-1\" class=\"text-right\">Ranking<th>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>{{kpi.name}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{kpi.min}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{kpi.value}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{kpi.max}}<td>\r\n\t\t\t\t<td class=\"text-right\">{{kpi.ranking}}<td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\r\n\t</div>\r\n\r\n</div>" }]
        }], propDecorators: { chart: [{
                type: Input,
                args: ["chart"]
            }, {
                type: Output,
                args: ["chart"]
            }] } });
export class ChartElement extends PageElement {
    constructor(app, pathService, translationService) {
        super(app);
        this.pathService = pathService;
        this.translationService = translationService;
    }
    load(loader) {
        this.pathService.serverGet(this.app.getBackendUrl(), this.url, loader, (err) => {
            console.log("error" + err);
        });
    }
    get url() {
        return this._url;
    }
    set url(value) {
        this._url = value;
    }
    get data() {
        return this._data;
    }
    set data(value) {
        this._data = value;
    }
}
//# sourceMappingURL=data:application/json;base64, 