2018-09-25 16:28:26 +00:00
|
|
|
import { computed } from '@ember/object';
|
|
|
|
import Component from '@ember/component';
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
export default Component.extend({
|
2018-04-03 14:16:57 +00:00
|
|
|
tagName: 'span',
|
2018-08-15 19:41:43 +00:00
|
|
|
classNames: 'tag is-outlined edition-badge',
|
|
|
|
attributeBindings: ['edition:aria-label'],
|
2018-09-25 16:28:26 +00:00
|
|
|
icon: computed('edition', function() {
|
2018-04-03 14:16:57 +00:00
|
|
|
const edition = this.get('edition');
|
2018-08-15 19:41:43 +00:00
|
|
|
const entEditions = ['Enterprise', 'Premium', 'Pro'];
|
|
|
|
|
2018-08-16 16:42:11 +00:00
|
|
|
if (entEditions.includes(edition)) {
|
2018-08-15 19:41:43 +00:00
|
|
|
return 'edition-enterprise';
|
2018-04-03 14:16:57 +00:00
|
|
|
} else {
|
2018-08-15 19:41:43 +00:00
|
|
|
return 'edition-oss';
|
2018-04-03 14:16:57 +00:00
|
|
|
}
|
|
|
|
}),
|
|
|
|
});
|