2017-08-22 10:53:26 +03:00
|
|
|
import Component from '@ember/component';
|
2022-02-01 12:34:03 +03:00
|
|
|
import classic from 'ember-classic-decorator';
|
|
|
|
import {action} from '@ember/object';
|
|
|
|
import {classNameBindings, tagName} from '@ember-decorators/component';
|
2017-08-22 10:53:26 +03:00
|
|
|
import {schedule} from '@ember/runloop';
|
2015-10-28 14:36:45 +03:00
|
|
|
|
2022-02-01 12:34:03 +03:00
|
|
|
@classic
|
|
|
|
@classNameBindings('active')
|
|
|
|
@tagName('li')
|
|
|
|
export default class GhActivatingListItem extends Component {
|
|
|
|
active = false;
|
|
|
|
linkClasses = null;
|
2015-07-09 00:08:36 +03:00
|
|
|
|
2022-02-01 12:34:03 +03:00
|
|
|
@action
|
|
|
|
setActive(value) {
|
|
|
|
schedule('afterRender', this, function () {
|
|
|
|
this.set('active', value);
|
|
|
|
});
|
|
|
|
}
|
2018-01-11 20:43:23 +03:00
|
|
|
|
|
|
|
click() {
|
2020-01-10 18:12:39 +03:00
|
|
|
this.element.querySelector('a').blur();
|
2015-07-09 00:08:36 +03:00
|
|
|
}
|
2022-02-01 12:34:03 +03:00
|
|
|
}
|