import Ember from 'ember';

const layoutProperties = [
    'layout',
    'layout-align',
    'flex-order',
    'flex',
    'offset',
    'hide',
    'show'

];

const layoutSingleRules = [
    'layout-type:layout',
    'layout-padding',
    'layout-margin',
    'layout-wrap',
    'layout-fill'
];

const sizeNames = [
    'sm',
    'gt-sm',
    'md',
    'gt-md',
    'lg',
    'gt-lg'

];

var finalRules = [];

Ember.EnumerableUtils.forEach(layoutProperties, (layoutProperty) => {
    Ember.EnumerableUtils.forEach(sizeNames, (sizeName) => {
        finalRules.push(layoutProperty + '-' + sizeName);
    });

    finalRules.push('hide');
    finalRules.push('show');
});

finalRules.push.apply(finalRules, layoutSingleRules);

var LayoutRulesMixin = Ember.Mixin.create({
    attributeBindings: finalRules

});

export default LayoutRulesMixin;

@@ -410,57 +410,71 @@
 %5B%5D;%0A
-%0AEmber.EnumerableUtils.forEach(layoutProperties, 
+var self = this;%0A%0Athis.get('layoutProperties').forEach(function
 (lay
@@ -489,59 +489,52 @@
 rty)
- =%3E 
 %7B%0A    
-Ember.EnumerableUtils.forEach(sizeNames, 
+self.get('sizeNames').forEach(function
 (siz
@@ -543,12 +543,8 @@
 ame)
- =%3E 
 %7B%0A  

remove enumerable utils