import Ember from 'ember';
import config from 'ember-get-config';

var levelMap = {
    1: 'info',
    2: 'warning',
    3: 'danger'
};

export default Ember.Component.extend({
    classNamesBindings: [
        'alert',
        '_info:alertInfo',
        '_warning:alertWarning',
        '_danger:alertDanger'
    ],

    attributeBindings: [
        'hidden'
    ],

    hidden: 'true',

    alert: true,
    _info: true,
    _warning: false,
    _danger: false,

    maintenance: {
        start: new Date(),
        end: new Date(),
    },

    init() {
        this._super(...arguments);

        if (!sessionStorage.getItem('maintenance-dismissed')) {
            Ember.$.ajax({
                url: `${config.OSF.apiUrl}/v2/status/`,
                crossDomain: true
            })
                .then(({maintenance}) => {
                    if (maintenance) {
                        this.setProperties({
                            hidden: false,
                            maintenance
                        });
                        this.set('_info', false);
                        this.set(`_${levelMap[maintenance.level]}`, true);
                    }
                });
        }
    },

    actions: {
        dismiss() {
            sessionStorage.setItem('maintenance-dismissed', true);
            this.set('hidden', true);
        }
    }
});

@@ -64,11 +64,13 @@
 ';%0A%0A
-var
+const
  lev
@@ -190,131 +190,57 @@
 ames
-Bindings: %5B%0A        
+: %5B
 'alert'
+%5D
 ,%0A    
-    '_info:alertInfo',%0A        '_warning:alertWarning',%0A        '_danger:alertDanger'%0A    
+classNameBindings: %5B'alertClass'
 %5D,%0A%0A
@@ -323,72 +323,27 @@
 lert
-: true,%0A    _info: true,%0A    _warning: false,%0A    _danger: false
+Class: 'alert-info'
 ,%0A%0A 
@@ -941,59 +941,28 @@
 et('
-_info', false);%0A                        this.set(%60_
+alertClass', %60alert-
 $%7Ble
@@ -990,16 +990,20 @@
 vel%5D
-%7D%60, true
+ %7C%7C 'info'%7D%60
 );%0A 

Use one alertClass