2021-03-28 11:06:49 +02:00
|
|
|
import { connectorContent } from "../lib/wizard-mapper";
|
2021-04-12 07:10:02 +02:00
|
|
|
import { alias, gt, or } from "@ember/object/computed";
|
2021-03-28 11:06:49 +02:00
|
|
|
import { computed, observes } from "@ember/object";
|
2020-04-05 03:37:09 +02:00
|
|
|
import Component from "@ember/component";
|
2020-04-01 07:03:26 +02:00
|
|
|
|
2020-04-05 03:37:09 +02:00
|
|
|
export default Component.extend({
|
2021-03-28 11:06:49 +02:00
|
|
|
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);
|
|
|
|
}),
|
|
|
|
});
|