import Component from '@glimmer/component';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';

export default class WordsGreekWordComponent extends Component {
  @service('word-select') selectWord;
  @service router;

  @action
  select(word) {
    this.selectWord.select(word);
    this.router.transitionTo('verse.word', word.strongsNumber);
  }

  get
  selected() {
    if(this.selectWord.isCurrentByOgntId(this.args.model)) {
      return "selected";
    } else {
      return "";
    }
  }
}
