2021-08-24 16:19:21 +03:00
|
|
|
import Component from '@glimmer/component';
|
|
|
|
import {action} from '@ember/object';
|
|
|
|
|
|
|
|
export default class GhDistributionActionSelect extends Component {
|
2021-10-21 15:07:56 +03:00
|
|
|
availablePublishActions = [{
|
|
|
|
value: 'publish_send',
|
|
|
|
name: 'publish & send'
|
|
|
|
}, {
|
|
|
|
value: 'publish',
|
|
|
|
name: 'publish'
|
|
|
|
}, {
|
|
|
|
value: 'send',
|
|
|
|
name: 'send'
|
|
|
|
}];
|
2021-08-24 16:19:21 +03:00
|
|
|
|
2021-10-21 15:07:56 +03:00
|
|
|
get distributionValue() {
|
|
|
|
return this.availablePublishActions.findBy('value', this.args.distributionAction);
|
2021-08-24 16:19:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@action
|
2021-08-26 22:01:26 +03:00
|
|
|
setDistributionAction(newAction) {
|
|
|
|
this.args.setDistributionAction(newAction.value);
|
2021-08-24 16:19:21 +03:00
|
|
|
}
|
|
|
|
}
|