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

@Component({
  selector: 'field-postal-code',
  template: `<app-input label="کد پستی" [control]="control" [name]="name" type="postalCode" />`,
  imports: [ReactiveFormsModule, InputComponent],
})
export class PostalCodeComponent {
  @Input({ required: true }) control = new FormControl<string>('');
  @Input() name = 'postal_code';
}
