en_btr_frontend/app/components/chapter-nav.js

25 lines
483 B
JavaScript

import Component from '@glimmer/component';
import { action } from '@ember/object';
import { tracked } from "@glimmer/tracking";
export default class ChapterNavComponent extends Component {
@tracked currentChapter;
constructor(...args) {
super(...args);
}
@action
showVerses(book, chapter)
{
this.args.showVerses(book, chapter);
this.currentChapter = chapter;
}
@action
isChapterActive(chapter)
{
return chapter === this.currentChapter;
}
}