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

export default class WordsMorphologyComponent extends Component {
  @service router;
  @service store;

  @tracked morphLegend;

  constructor(...args) {
    super(...args);
    this.getMorphDetail();
  }

  async getMorphDetail()
  {
    if (this.args.morph == 'undefined' || this.args.morph == '') {
      return;
    }
    const result = await this.store.findRecord('morph-legend', this.args.morph);
    this.morphLegend = result.description;
  }
}
