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

@Component({
  selector: 'field-invoice-number-sequence',
  template: `<app-input
    label="شروع شماره فاکتور"
    [control]="control"
    [name]="name"
    type="number"
    [min]="min"
  />`,
  imports: [ReactiveFormsModule, InputComponent],
})
export class InvoiceNumberSequenceComponent {
  @Input({ required: true }) control = new FormControl<number>(1);
  @Input() name = 'invoice_number_sequence';
  @Input() min? = 1;
}
