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