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

@Component({
  selector: 'app-modal',
  imports: [NgIf],
  standalone: true,
  templateUrl: './modal.component.html',
})
export class ModalComponent {
  @Input() open: boolean = false;
  @Output() openChange = new EventEmitter<boolean>();

  toggleOpen() {
    this.open = !this.open;
    this.openChange.emit(this.open);
  }
}
