2019-05-01 15:57:00 +03:00
|
|
|
import Component from '@ember/component';
|
2022-02-03 21:50:49 +03:00
|
|
|
import classic from 'ember-classic-decorator';
|
2019-05-01 15:57:00 +03:00
|
|
|
import {computed} from '@ember/object';
|
2022-02-03 21:50:49 +03:00
|
|
|
import {tagName} from '@ember-decorators/component';
|
2019-05-01 15:57:00 +03:00
|
|
|
|
2022-02-03 21:50:49 +03:00
|
|
|
@classic
|
|
|
|
@tagName('')
|
|
|
|
export default class KgActionBar extends Component {
|
|
|
|
instantClose = false;
|
|
|
|
isVisible = false;
|
|
|
|
style = null;
|
2019-05-01 15:57:00 +03:00
|
|
|
|
2022-02-03 21:50:49 +03:00
|
|
|
@computed('isVisible', 'instantClose')
|
|
|
|
get animationClasses() {
|
2019-05-01 15:57:00 +03:00
|
|
|
let {instantClose, isVisible} = this;
|
|
|
|
let classes = [];
|
|
|
|
|
|
|
|
if (!instantClose || (instantClose && isVisible)) {
|
|
|
|
classes.push('anim-fast-bezier');
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isVisible) {
|
|
|
|
classes.push('o-0 pop-down');
|
|
|
|
}
|
|
|
|
|
|
|
|
return classes.join(' ');
|
2022-02-03 21:50:49 +03:00
|
|
|
}
|
|
|
|
}
|