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

@Component({
  selector: 'app-modal',
  templateUrl: './modal.component.html',
  styleUrls: ['./modal.component.scss'],
})
export class ModalComponent {
  @Input() isVisible = false;
  @Input() showClose = true;
  @Input() title = '';

  @Output() onClose = new EventEmitter<void>();
  @Output() isVisibleChange = new EventEmitter<boolean>();

  handleClose() {
    this.onClose.emit();
    this.isVisibleChange.emit(false);
  }
}
