2022-12-09 20:06:49 +03:00
|
|
|
import Component from '@glimmer/component';
|
|
|
|
import {action} from '@ember/object';
|
2021-06-18 16:39:02 +03:00
|
|
|
|
2022-12-09 20:06:49 +03:00
|
|
|
export default class GhBenefitItem extends Component {
|
|
|
|
@action
|
|
|
|
handleLabelInput(event) {
|
|
|
|
this.updateLabel(event.target.value);
|
|
|
|
}
|
2021-06-18 16:39:02 +03:00
|
|
|
|
2022-12-09 20:06:49 +03:00
|
|
|
@action
|
|
|
|
updateLabel(value) {
|
|
|
|
this.args.updateLabel(value, this.args.benefitItem);
|
|
|
|
}
|
2021-06-18 16:39:02 +03:00
|
|
|
|
2022-12-09 20:06:49 +03:00
|
|
|
@action
|
|
|
|
clearLabelErrors() {
|
|
|
|
this.args.benefitItem.errors?.remove('name');
|
2021-06-18 16:39:02 +03:00
|
|
|
}
|
2022-12-09 20:06:49 +03:00
|
|
|
}
|