/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
 */
import { WebPlatformApiService } from '../../services/WebPlatformApiService';
import { DataRequestError } from '../../interfaces/DisplayInterfaces';
import { Component, Input } from '@angular/core';
var DataErrorDisplayComponent = /** @class */ (function () {
    function DataErrorDisplayComponent(webPlatformApiService) {
        var _this = this;
        this.webPlatformApiService = webPlatformApiService;
        this.customMessage = undefined;
        this.dataPolicyList = [];
        this.webPlatformApiService.GetConfig('DataPolicyList').subscribe(function (x) {
            _this.dataPolicyList = x;
            _this.matchingDataPolicy = _this.dataPolicyList.find(function (dp) { return dp.name === _this.dataRequestError.dataPolicy; });
        });
    }
    /**
     * @return {?}
     */
    DataErrorDisplayComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
    };
    DataErrorDisplayComponent.decorators = [
        { type: Component, args: [{
                    selector: 'app-data-error-display',
                    template: "<tabset type=\"pills\">\r\n  <tab heading=\"Error\">\r\n    <table class=\"table table-striped table-sm\">\r\n      <thead>\r\n        <tr class=\"table-danger\">\r\n          <td colspan=\"2\">Data Retrieval Error</td>\r\n        </tr>\r\n      </thead>\r\n      <tbody>\r\n        <tr *ngIf=\"customMessage\">\r\n          <td colspan=\"2\">{{customMessage}}</td>\r\n        </tr>\r\n\r\n        <tr *ngIf=\"dataRequestError && dataRequestError.widgetName\">\r\n          <td>Widget</td>\r\n          <td>{{dataRequestError.widgetName}}</td>\r\n        </tr>\r\n        <tr *ngIf=\"matchingDataPolicy && matchingDataPolicy.supportGroup\">\r\n          <td>Data Support Group</td>\r\n          <td>{{matchingDataPolicy.supportGroup}}</td>\r\n        </tr>\r\n        <tr *ngIf=\"matchingDataPolicy && matchingDataPolicy.supportMessage\">\r\n          <td>Data support Message</td>\r\n          <td>{{matchingDataPolicy.supportMessage}}</td>\r\n        </tr>\r\n        <tr *ngIf=\"matchingDataPolicy && matchingDataPolicy.supportNameList\">\r\n          <td>Contact List</td>\r\n          <td>{{matchingDataPolicy.supportNameList}}</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n  </tab>\r\n  <tab heading=\"Details\">\r\n    <table class=\"table table-striped table-sm\">\r\n      <thead>\r\n        <tr class=\"table-danger\">\r\n          <td colspan=\"2\">Data Retrieval Error</td>\r\n        </tr>\r\n      </thead>\r\n      <tbody>\r\n        <tr *ngIf=\"dataRequestError && dataRequestError.ErrorMessage\">\r\n          <td>Error Message</td>\r\n          <td>{{dataRequestError.ErrorMessage}}</td>\r\n        </tr>\r\n        <tr *ngIf=\"dataRequestError && dataRequestError.dataPolicy\">\r\n          <td>data policy</td>\r\n          <td>{{dataRequestError.dataPolicy}}</td>\r\n        </tr>\r\n        <tr *ngIf=\"dataRequestError && dataRequestError.RequestKey\">\r\n          <td>data key</td>\r\n          <td>{{dataRequestError.RequestKey}}</td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n  </tab>\r\n</tabset>",
                    styles: [""]
                }] }
    ];
    /** @nocollapse */
    DataErrorDisplayComponent.ctorParameters = function () { return [
        { type: WebPlatformApiService }
    ]; };
    DataErrorDisplayComponent.propDecorators = {
        dataRequestError: [{ type: Input }],
        parentConfig: [{ type: Input }],
        customMessage: [{ type: Input }]
    };
    return DataErrorDisplayComponent;
}());
export { DataErrorDisplayComponent };
if (false) {
    /** @type {?} */
    DataErrorDisplayComponent.prototype.dataRequestError;
    /** @type {?} */
    DataErrorDisplayComponent.prototype.parentConfig;
    /** @type {?} */
    DataErrorDisplayComponent.prototype.customMessage;
    /** @type {?} */
    DataErrorDisplayComponent.prototype.dataPolicyList;
    /** @type {?} */
    DataErrorDisplayComponent.prototype.matchingDataPolicy;
    /** @type {?} */
    DataErrorDisplayComponent.prototype.webPlatformApiService;
}

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS1lcnJvci1kaXNwbGF5LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL3dlYi1wbGF0Zm9ybS1saWJy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