1 import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
2 import { ValidatorFn } from '@angular/forms';
4 import { I18n } from '@ngx-translate/i18n-polyfill';
6 import { Icons } from '../../../shared/enum/icons.enum';
7 import { SelectMessages } from '../select/select-messages.model';
8 import { SelectOption } from '../select/select-option.model';
9 import { SelectComponent } from '../select/select.component';
12 selector: 'cd-select-badges',
13 templateUrl: './select-badges.component.html',
14 styleUrls: ['./select-badges.component.scss']
16 export class SelectBadgesComponent {
18 data: Array<string> = [];
20 options: Array<SelectOption> = [];
22 messages = new SelectMessages({}, this.i18n);
24 selectionLimit: number;
28 customBadgeValidators: ValidatorFn[] = [];
31 selection = new EventEmitter();
33 @ViewChild('cdSelect', { static: true })
34 cdSelect: SelectComponent;
38 constructor(private i18n: I18n) {}