import { AbstractDialog } from '@/shared/abstractClasses/abstract-dialog';
import { SharedDialogComponent } from '@/shared/components/dialog/dialog.component';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { ICustomerResponse } from '../models';
import { ConsumerCustomerIndividualFormComponent } from './form-individual.component';
import { ConsumerCustomerLegalFormComponent } from './form-legal.component';

@Component({
  selector: 'consumer-customer-form-dialog',
  templateUrl: './form-dialog.component.html',
  standalone: true,
  imports: [
    ConsumerCustomerIndividualFormComponent,
    ConsumerCustomerLegalFormComponent,
    ReactiveFormsModule,
    SharedDialogComponent,
  ],
})
export class ConsumerBusinessActivityFormComponent extends AbstractDialog {
  @Output() onSubmit = new EventEmitter();
  @Input({ required: true }) customer!: ICustomerResponse;

  submit() {
    this.onSubmit.emit();
  }
}
