<form [formGroup]="form" (submit)="submit()">
  <app-input [control]="form.controls.unit_price" name="unit_price" label="قیمت پایه" type="price" />
  <app-input
    [control]="form.controls.quantity"
    name="quantity"
    [label]="preparedFormVisuals().quantityLabel"
    type="number"
    [suffix]="preparedFormVisuals().quantitySymbolText"
    [min]="0"
  />

  <app-amount-percentage-input
    [percentageControl]="form.controls.discount_percentage"
    [amountControl]="form.controls.discount_amount"
    [baseAmount]="baseTotalAmount()"
    [minAmount]="0"
    [maxAmount]="baseTotalAmount()"
    name="discount"
    label="تخفیف"
  />

  <hr />
  <div class="flex flex-col gap-4 justify-center w-full">
    <pos-form-dialog-amount-card-template
      [totalAmount]="totalAmount()"
      [baseTotalAmount]="baseTotalAmount()"
      [discountAmount]="discountAmount()"
      [taxAmount]="taxAmount()"
    />
    <p-button class="sm:w-auto w-full" (onClick)="submit()"> {{ preparedCTAText() }} </p-button>
  </div>
</form>
