<div class="fl-heading-md fl-margin-top fl-margin-bottom-small" i18n>DirectAdmin module configuration</div>

<form *ngIf="!loadingProducts && directAdminProducts" [formGroup]="productSettingsForm" layoutDirection="column">
  <mat-form-field>
    <mat-label i18n>DirectAdmin product ID</mat-label>
    <mat-select formControlName="directadmin_product_id" placeholder="DirectAdmin product ID" i18n-placeholder>
      <mat-option *ngFor="let product of directAdminProducts" [value]="product.pid">
        {{product.display_name}}
      </mat-option>
    </mat-select>
    <mat-error>{{backendErrors['directadmin_product_id'] || fieldRequiredTxt}}</mat-error>
  </mat-form-field>
</form>
<div *ngIf="!loadingProducts && !directAdminProducts">
  <p class="fl-red-color" i18n>Error loading DirectAdmin products, please check configuration.</p>
</div>
<div class="fl-margin-top-medium">
  <p class="fl-detail" i18n><span class="fl-bold">DirectAdmin licensing product configuration</span><br>
    The DirectAdmin product used to generate licenses should be selected here.
  </p>
</div>
