import { Component, Input, OnInit } from '@angular/core';
import { isNumber } from '@utils/common';

@Component({
  selector: 'ui-tshirt',
  templateUrl: 'ui-tshirt.component.html',
  styleUrls: ['ui-tshirt.component.scss'],
})
export class UiTshirtComponent {
  /** Input für size: number
   * XS: 0
   * S: 15
   * M: 30
   * L: 60
   * XL: 120
   */

  @Input()
  set effort(value: number) {
    switch (value) {
      case 0:
        this.size = 'XS';
        break;
      case 15:
        this.size = 'S';
        break;
      case 30:
        this.size = 'M';
        break;
      case 60:
        this.size = 'L';
        break;
      case 120:
        this.size = 'XL';
        break;

      default:
        this.size = '';
        break;
    }
  }

  @Input()
  size: string;

  constructor() {}
}
