2020-04-02 07:21:57 +02:00
|
|
|
import Component from "@ember/component";
|
2020-04-06 10:36:38 +02:00
|
|
|
import { gt } from '@ember/object/computed';
|
2020-04-02 07:21:57 +02:00
|
|
|
import { computed } from "@ember/object";
|
2020-04-11 08:22:12 +02:00
|
|
|
import { removeMapperClasses } from '../lib/wizard-mapper';
|
2020-04-02 07:21:57 +02:00
|
|
|
|
|
|
|
export default Component.extend({
|
2020-04-06 10:36:38 +02:00
|
|
|
classNameBindings: [':mapper-connector', ':mapper-block', 'hasMultiple::single'],
|
|
|
|
hasMultiple: gt('connectors.length', 1),
|
2020-04-02 07:21:57 +02:00
|
|
|
connectorLabel: computed(function() {
|
|
|
|
let key = this.connector;
|
|
|
|
let path = this.inputTypes ? `input.${key}.name` : `connector.${key}`;
|
|
|
|
return I18n.t(`admin.wizard.${path}`);
|
2020-04-11 08:22:12 +02:00
|
|
|
}),
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
onOpen() {
|
|
|
|
removeMapperClasses(this);
|
|
|
|
}
|
|
|
|
}
|
2020-04-02 07:21:57 +02:00
|
|
|
});
|