/*
 *  Copyright (c) 2019 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { Component } from '@angular/core';
import { ValidationErrors } from '@angular/forms';
import { ChipOption } from '@bci-web-core/core';
import { ScrollIntoViewService } from '../../shared/scroll-into-view.service';

@Component({
  selector: 'bci-chip-list-autocomplete-demo',
  templateUrl: './chip-list-autocomplete-demo.component.html',
})
export class ChipListAutocompleteDemoComponent {

  constructor(public scrollIntoViewService: ScrollIntoViewService) { }
  
  chipListInputAutocompleteValues1: ChipOption[] = [];
  chipListInputAutocompleteValues2: ChipOption[] = [];
  chipListInputAutocompleteValues3: ChipOption[] = [];
  chipListInputAutocompleteValues4: ChipOption[] = [];
  chipListInputAutocompleteValues5: ChipOption[] = [];
  chipListInputAutocompleteValues6: ChipOption[] = [];
  chipListInputAutocompleteValues7: ChipOption[] = [];

  selectedNotificationType1 = "info";
  selectedNotificationType2 = "info";

  chipListOptions: ChipOption[] = [
    { id: '1', name: 'Option1' },
    { id: '2', name: 'Option2' },
    { id: '3', name: 'Option3' },
    { id: '4', name: 'Option4' },
    { id: '5', name: 'Option5' },
    { id: '6', name: 'very-long-option-with-hyphen' },
  ];

  chipListAutocompleteDisabled = false;

  chipListAutocompleteReadonly = false;

  chipListAutocompleteRequired = false;

  chipsDisplayed = '2';

  reverseChips = true;

  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  validateAlwaysError(userInput: string): ValidationErrors {
    return { alwaysAnError: true };
  }
}
