1 import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
2 import { ValidatorFn } from '@angular/forms';
4 import { I18n } from '@ngx-translate/i18n-polyfill';
5 import * as _ from 'lodash';
7 import { Icons } from '../../../shared/enum/icons.enum';
8 import { SelectMessages } from '../select/select-messages.model';
9 import { SelectOption } from '../select/select-option.model';
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')
38 constructor(private i18n: I18n) {}