1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/components/wizard-mapper-pair.js.es6
2021-04-12 15:44:47 +10:00

16 Zeilen
592 B
JavaScript

import { connectorContent } from "../lib/wizard-mapper";
import { alias, gt } from "@ember/object/computed";
import { computed } from "@ember/object";
import Component from "@ember/component";
export default Component.extend({
classNameBindings: [":mapper-pair", "hasConnector::no-connector"],
firstPair: gt("pair.index", 0),
showRemove: alias("firstPair"),
showJoin: computed("pair.pairCount", function () {
return this.pair.index < this.pair.pairCount - 1;
}),
connectors: computed(function () {
return connectorContent("pair", this.inputType, this.options);
}),
});