<form [formGroup]="formGroup" [bitSubmit]="submit" *ngIf="!loading; else spinner">
  <div class="tw-w-full tw-max-w-[1200px]">
    <p class="tw-mt-8" *ngIf="!loading">
      {{ "machineAccountPeopleDescription" | i18n }}
    </p>
    <sm-access-policy-selector
      [loading]="loading"
      formControlName="accessPolicies"
      [addButtonMode]="true"
      [items]="potentialGrantees"
      [label]="'people' | i18n"
      [hint]="'projectPeopleSelectHint' | i18n"
      [columnTitle]="'name' | i18n"
      [emptyMessage]="'projectEmptyPeopleAccessPolicies' | i18n"
      [staticPermission]="staticPermission"
    >
    </sm-access-policy-selector>
    <button bitButton buttonType="primary" bitFormButton type="submit" class="tw-mt-7">
      {{ "save" | i18n }}
    </button>
  </div>
</form>

<ng-template #spinner>
  <div class="tw-items-center tw-justify-center tw-pt-64 tw-text-center">
    <i class="bwi bwi-spinner bwi-spin bwi-3x"></i>
  </div>
</ng-template>
