/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
 */
import { Component, Input } from '@angular/core';
import { DisplayStateService } from '../../../services/DisplayStateService';
export class CoreWidgetContainerComponent {
    /**
     * @param {?} displayStateService
     */
    constructor(displayStateService) {
        this.displayStateService = displayStateService;
        this.flag = false;
    }
    /**
     * @return {?}
     */
    UserAcessDenied() {
        if (!this.Config.adminRequired) {
            return false;
        }
        else {
            return !this.displayStateService.appState.current.userIsAdmin;
        }
    }
}
CoreWidgetContainerComponent.decorators = [
    { type: Component, args: [{
                selector: 'app-core-widget-container',
                template: "<div *ngIf=\"UserAcessDenied(); else OK\">\r\n  <h4>Component requires platform administration access.</h4>\r\n</div>\r\n\r\n<ng-template #OK>\r\n  <div [ngSwitch]=\"Config.componentType\">\r\n\r\n    <div *ngSwitchCase=\"'MasterConfiguration'\">       <app-master-configuration [Config]=\"Config\"></app-master-configuration> </div>\r\n    <div *ngSwitchCase=\"'app-master-configuration'\">  <app-master-configuration [Config]=\"Config\"></app-master-configuration> </div>\r\n\r\n    <div *ngSwitchCase=\"'app-user-widget-prefs'\">     <app-user-widget-prefs [Config]=\"Config\"></app-user-widget-prefs>       </div>\r\n    \r\n    <div *ngSwitchCase=\"'app-landing-page'\">          <app-landing-page [Config]=\"Config\"></app-landing-page>                 </div>\r\n    <div *ngSwitchCase=\"'app-landing-page-sidenav'\">  <app-landing-page-sidenav [Config]=\"Config\"></app-landing-page-sidenav> </div>\r\n\r\n\r\n    <div *ngSwitchCase=\"'CacheDataAdmin'\">            <app-cache-data-admin [Config]=\"Config\"></app-cache-data-admin>         </div>\r\n    <div *ngSwitchCase=\"'app-cache-data-admin'\">      <app-cache-data-admin [Config]=\"Config\"></app-cache-data-admin>         </div>\r\n\r\n    <div *ngSwitchCase=\"'app-data-policy-testing'\">   <app-data-policy-testing [Config]=\"Config\"></app-data-policy-testing>   </div>\r\n\r\n    <div *ngSwitchCase=\"'WidgetHelp'\">                <app-widget-help [Config]=\"Config\"></app-widget-help>                   </div>\r\n    <div *ngSwitchCase=\"'app-widget-help'\">           <app-widget-help [Config]=\"Config\"></app-widget-help>                   </div>\r\n\r\n    <div *ngSwitchCase=\"'Diagnostics'\">               <app-diagnostics [Config]=\"Config\"></app-diagnostics>                   </div>\r\n    <div *ngSwitchCase=\"'app-diagnostics'\">           <app-diagnostics [Config]=\"Config\"></app-diagnostics>                   </div>\r\n\r\n    <div *ngSwitchCase=\"'RandomChartWidget'\">         <app-random-chart [Config]=\"Config\"></app-random-chart>                 </div>\r\n    <div *ngSwitchCase=\"'app-random-chart'\">          <app-random-chart [Config]=\"Config\"></app-random-chart>                 </div>\r\n\r\n    <div *ngSwitchCase=\"'GenericWidgetChart'\">        <app-generic-chart [Config]=\"Config\"></app-generic-chart>               </div>\r\n    <div *ngSwitchCase=\"'app-generic-chart'\">         <app-generic-chart [Config]=\"Config\"></app-generic-chart>               </div>\r\n\r\n    <div *ngSwitchCase=\"'GenericWidgetTable'\">        <app-generic-table [Config]=\"Config\"></app-generic-table>               </div>\r\n    <div *ngSwitchCase=\"'app-generic-table'\">         <app-generic-table [Config]=\"Config\"></app-generic-table>               </div>\r\n\r\n    <div *ngSwitchCase=\"'TableauComponent'\">          <app-tableau [Config]=\"Config\"></app-tableau>                           </div>\r\n    <div *ngSwitchCase=\"'app-tableau'\">               <app-tableau [Config]=\"Config\"></app-tableau>                           </div>\r\n\r\n    <div *ngSwitchCase=\"'GenericGroupedDataSideNav'\"> <app-generic-side-nav [Config]=\"Config\"></app-generic-side-nav>         </div>\r\n    <div *ngSwitchCase=\"'app-generic-side-nav'\">      <app-generic-side-nav [Config]=\"Config\"></app-generic-side-nav>         </div>\r\n\r\n    <div *ngSwitchDefault>\r\n      <h3>No component registered for configuration name '{{Config.componentType}}'</h3>\r\n    </div>\r\n  </div>\r\n</ng-template>\r\n",
                styles: ["span{width:auto;height:auto;display:inline-block}"]
            }] }
];
/** @nocollapse */
CoreWidgetContainerComponent.ctorParameters = () => [
    { type: DisplayStateService }
];
CoreWidgetContainerComponent.propDecorators = {
    Config: [{ type: Input }]
};
if (false) {
    /** @type {?} */
    CoreWidgetContainerComponent.prototype.Config;
    /** @type {?} */
    CoreWidgetContainerComponent.prototype.flag;
    /** @type {?} */
    CoreWidgetContainerComponent.prototype.displayStateService;
}

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