var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Component, Input, Output } from "@angular/core";
import { PageElement } from "../page-element";
// Note: Chart would be an example for a custom path element contributed by a path user
var ChartComponent = /** @class */ (function () {
    function ChartComponent() {
    }
    ChartComponent.prototype.ngAfterViewInit = function () {
        var _this = this;
        this.chart.load(function (data) {
            _this.chart.data = data;
        });
    };
    __decorate([
        Input("chart"),
        Output("chart"),
        __metadata("design:type", ChartElement)
    ], ChartComponent.prototype, "chart", void 0);
    ChartComponent = __decorate([
        Component({
            selector: "path-radar-chart",
            templateUrl: "chart.component.html"
        })
    ], ChartComponent);
    return ChartComponent;
}());
export { ChartComponent };
var ChartElement = /** @class */ (function (_super) {
    __extends(ChartElement, _super);
    function ChartElement(app, pathService, translationService) {
        var _this = _super.call(this, app) || this;
        _this.pathService = pathService;
        _this.translationService = translationService;
        return _this;
    }
    ChartElement.prototype.load = function (loader) {
        this.pathService.serverGet(this.app.getBackendUrl(), this.url, loader, function (err) {
            console.log("error" + err);
        });
    };
    Object.defineProperty(ChartElement.prototype, "url", {
        get: function () {
            return this._url;
        },
        set: function (value) {
            this._url = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ChartElement.prototype, "data", {
        get: function () {
            return this._data;
        },
        set: function (value) {
            this._data = value;
        },
        enumerable: false,
        configurable: true
    });
    return ChartElement;
}(PageElement));
export { ChartElement };
//# sourceMappingURL=chart.component.js.map