/*
 * Copyright (C) 2022 Robert Bosch GmbH Copyright (C) 2023 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { Component } from '@angular/core';
import { BciPicklistIntl } from '@bci-web-core/core';
import { PicklistIntlDemo } from '../internationalization/picklist-intl-demo';
import { fruits } from '../bci-core-picklist-demo-model';

/** This demo shows how the target items max limit is applied. */
@Component({
  selector: 'bci-target-items-max-limit',
  templateUrl: './target-items-max-limit.component.html',
  styleUrls: ['./target-items-max-limit.component.scss'],
  providers: [{ provide: BciPicklistIntl, useClass: PicklistIntlDemo }],
})
export class TargetItemsMaxLimitComponent {
  fruitNamesList = fruits.map((fruit) => fruit.name);

  /**
   * No more than 3 fruits can be selected into the target list
   */
  targetItemsMaxLimit = 3;
}
