2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
*/
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|