2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2021-01-25 18:13:54 +00:00
|
|
|
import Component from '@glimmer/component';
|
|
|
|
import { tracked } from '@glimmer/tracking';
|
|
|
|
import { action } from '@ember/object';
|
2020-08-11 17:02:51 +00:00
|
|
|
|
2021-01-25 18:13:54 +00:00
|
|
|
export default class Option extends Component {
|
|
|
|
@tracked selected;
|
|
|
|
|
|
|
|
@action
|
|
|
|
connect() {
|
|
|
|
this.args.select.addOption(this);
|
|
|
|
}
|
|
|
|
@action
|
|
|
|
disconnect() {
|
|
|
|
this.args.select.removeOption(this);
|
|
|
|
}
|
|
|
|
}
|