]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/blob
17d05ed4b48d76c81325374d31ac113686030bdd
[ceph.git] /
1 import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
2 import { ValidatorFn } from '@angular/forms';
3
4 import { Icons } from '../../../shared/enum/icons.enum';
5 import { SelectMessages } from '../select/select-messages.model';
6 import { SelectOption } from '../select/select-option.model';
7 import { SelectComponent } from '../select/select.component';
8
9 @Component({
10   selector: 'cd-select-badges',
11   templateUrl: './select-badges.component.html',
12   styleUrls: ['./select-badges.component.scss']
13 })
14 export class SelectBadgesComponent {
15   @Input()
16   data: Array<string> = [];
17   @Input()
18   options: Array<SelectOption> = [];
19   @Input()
20   messages = new SelectMessages({});
21   @Input()
22   selectionLimit: number;
23   @Input()
24   customBadges = false;
25   @Input()
26   customBadgeValidators: ValidatorFn[] = [];
27
28   @Output()
29   selection = new EventEmitter();
30
31   @ViewChild('cdSelect', { static: true })
32   cdSelect: SelectComponent;
33
34   icons = Icons;
35 }