import { Component, EventEmitter, Input, Output } from '@angular/core';

@Component({
  selector: 'app-radio',
  templateUrl: './radio.component.html',
  styleUrls: ['./radio.component.scss'],
})
export class RadioComponent {
  @Input() fieldName = '';
  @Input() value = '';
  @Input() isChecked = false;

  @Output() onSelect = new EventEmitter<string>();

  handleSelect() {
    this.onSelect.emit(this.value);
  }
}
