<form
  class="organization-picker-form"
  [ngClass]="{'organization-picker-form--compact': compact}"
  *ngIf="organizationPickerFormGroup"
  [formGroup]="organizationPickerFormGroup"
  (ngSubmit)="onFormSubmitted()"
>
  <ui-select
    [formControl]="organizationFormControl"
    [uiLabel]="label"
    [uiPlaceholder]="label"
    [uiOptions]="selectableOrganizations"
    [uiRequired]="true"
    [uiInvalid]="organizationFormControl.invalid && organizationFormControl.touched"
    uiValidationMessage="Du måste välja en organisation för att kunna logga in"
  ></ui-select>
  <digi-button class="organization-picker-form__submit" af-type="submit">{{submitText}}</digi-button>
</form>
