tidal-cli-client
Version:
You can now use Tidal on linux. With your loved CLI. <3
18 lines (15 loc) • 462 B
JavaScript
const BaseElement = require("../../abstract/BaseElement");
const blessed = require("blessed");
module.exports = class extends BaseElement {
constructor(parent, options, children) {
super(parent, blessed.radioset(options));
this.children = children;
}
getSelectedValue() {
const checked = this.children.find(x => x.element.checked);
return checked ? checked.element.text : undefined;
}
async run() {
await this.showElements(this.children);
}
};