/**
 * @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';
export class DataErrorDisplayComponent {
    /**
     * @param {?} webPlatformApiService
     */
    constructor(webPlatformApiService) {
        this.webPlatformApiService = webPlatformApiService;
        this.customMessage = undefined;
        this.dataPolicyList = [];
        this.webPlatformApiService.GetConfig('DataPolicyList').subscribe(x => {
            this.dataPolicyList = x;
            this.matchingDataPolicy = this.dataPolicyList.find(dp => dp.name === this.dataRequestError.dataPolicy);
        });
    }
    /**
     * @return {?}
     */
    ngOnInit() {
    }
}
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 = () => [
    { type: WebPlatformApiService }
];
DataErrorDisplayComponent.propDecorators = {
    dataRequestError: [{ type: Input }],
    parentConfig: [{ type: Input }],
    customMessage: [{ type: Input }]
};
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS1lcnJvci1kaXNwbGF5LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL3dlYi1wbGF0Zm9ybS1saWJyYXJ5LyIsInNvdXJjZXMiOlsiY29tcG9uZW50cy9kYXRhLWVycm9yLWRpc3BsYXkvZGF0YS1lcnJvci1kaXNwbGF5LmNvbXBvbmVudC50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