import {Component, ElementRef, Input, ViewChild} from "@angular/core";
declare var UIkit;
@Component({
selector: 'dropdown-filter',
template: `
`
})
export class DropdownFilterComponent {
@Input()
public name;
@Input()
public count: number = 0;
@Input()
public dropdownClass: string;
@Input()
public disabled = false;
@ViewChild("dropdownElement") dropdownElement: ElementRef;
get isOpen() {
return this.dropdownElement && UIkit.dropdown(this.dropdownElement.nativeElement).isActive();
}
closeDropdown() {
UIkit.dropdown(this.dropdownElement.nativeElement).hide();
}
}