/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
 */
import { Component, Input } from '@angular/core';
import { DisplayStateService } from '../../../services/DisplayStateService';
var CoreWidgetContainerComponent = /** @class */ (function () {
    function CoreWidgetContainerComponent(displayStateService) {
        this.displayStateService = displayStateService;
        this.flag = false;
    }
    /**
     * @return {?}
     */
    CoreWidgetContainerComponent.prototype.UserAcessDenied = /**
     * @return {?}
     */
    function () {
        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 = function () { return [
        { type: DisplayStateService }
    ]; };
    CoreWidgetContainerComponent.propDecorators = {
        Config: [{ type: Input }]
    };
    return CoreWidgetContainerComponent;
}());
export { CoreWidgetContainerComponent };
if (false) {
    /** @type {?} */
    CoreWidgetContainerComponent.prototype.Config;
    /** @type {?} */
    CoreWidgetContainerComponent.prototype.flag;
    /** @type {?} */
    CoreWidgetContainerComponent.prototype.displayStateService;
}

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