import { Component, Input } from '@angular/core';
import { FormControl, ReactiveFormsModule } from '@angular/forms';
import { InputComponent } from '../input/input.component';

@Component({
  selector: 'field-email',
  template: `<app-input label="آدرس ایمیل" [control]="control" [name]="name" type="email" />`,
  imports: [ReactiveFormsModule, InputComponent],
})
export class EmailComponent {
  @Input({ required: true }) control = new FormControl<string>('');
  @Input() name = 'email';
}
