<ng-container *ngVar="(user$ | async) as user">
  <div class="container" *ngIf="user">
    <h3 class="mb-4">{{'profile.head' | translate}}</h3>
    <div class="card mb-4">
      <div class="card-header">{{'profile.card.identify' | translate}}</div>
      <div class="card-body">
        <ds-profile-page-metadata-form [user]="user"></ds-profile-page-metadata-form>
      </div>
    </div>
    <div class="card mb-4">
      <div class="card-header">{{'profile.card.security' | translate}}</div>
      <div class="card-body">
        <ds-profile-page-security-form
                [FORM_PREFIX]="'profile.security.form.'"
                (isInvalid)="setInvalid($event)"
                (passwordValue)="setPasswordValue($event)"
        ></ds-profile-page-security-form>
      </div>
    </div>
    <button class="btn btn-outline-primary" (click)="updateProfile()">{{'profile.form.submit' | translate}}</button>

    <ng-container *ngVar="(groupsRD$ | async)?.payload?.page as groups">
      <div *ngIf="groups">
        <h3 class="mt-4">{{'profile.groups.head' | translate}}</h3>
        <ul class="list-group list-group-flush">
          <li *ngFor="let group of groups" class="list-group-item">{{group.name}}</li>
        </ul>
      </div>
    </ng-container>
  </div>
</ng-container>
