import Component from '@glimmer/component'; import { tracked } from "@glimmer/tracking"; import { action } from '@ember/object'; import { inject as service } from '@ember/service'; export default class ChapterComponent extends Component { @service('nav-state') navState; @action selectChapter() { this.args.showVerses(this.args.book, this.args.chapter); this.navState.setChapter(this.args.chapter); } get selected() { if(this.navState.isCurrentChapter(this.args.chapter)) { return "selected"; } else { return ""; } } }