<ion-content>
  <div class="main-content d-flex height-100">

    <div class="content d-flex flex-column width-100">
      <div class="header-content pb-20">
        <div class="header-title">
          <label>Reencaminhar</label>
        </div>
      </div>
      <div class="overflow-y-auto">

        <div class="container-div">
          <div class="ion-item-class-2">
            <div class="ion-icon-class">
              <ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
            </div>
            <div class="ion-input-class-no-height cursor-pointer" (click)="addParticipants()">
              <div class="list-people">
                <ion-item lines="none">
                  <ion-list>
                    <ion-label *ngIf="taskParticipants?.length < 1" class="list-people-title">Adicionar intervenientes</ion-label>
                    <ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
                  </ion-list>
                </ion-item>
              </div>
              <div class="add-people" >
                <ion-icon *ngIf="ThemeService.currentTheme == 'default' "  slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
                <ion-icon *ngIf="ThemeService.currentTheme == 'gov' "  slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
              </div>
            </div>
          </div>
        </div>

        <div class="container-div">
          <div class="ion-item-class-2 d-flex">
            <div class="ion-icon-class">
              <ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
            </div>
            <div class="ion-input-class-no-height width-100">
              <ion-textarea [(ngModel)]="note" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
            </div>
          </div>
        </div>



        <div *ngIf="loadedAttachments">
          <ion-item>
            <ion-label>Documentos Anexados</ion-label>
          </ion-item>
          <ion-list>
            <ion-item *ngFor="let attachment of loadedAttachments">
            <ion-label>
              <h4 class="attach-title-item">{{attachment.Description}}</h4>
              <p><span class="span-left">{{attachment.Stakeholders}}</span><span class="span-right"> {{ attachment.CreateDate | date: 'dd/MM/yyyy' }}</span></p>
            </ion-label>
          </ion-item>
          </ion-list>
        </div>
      </div>
      
    </div>

    <div class="aside-righ flex-grow-1">
      <app-attendee-modal class=" d-flex flex-column height-100" 
        [footer]="false"
        *ngIf="showAttendees"
        [taskParticipants]="taskParticipants"
        [taskParticipantsCc]="taskParticipantsCc"
        [adding]="adding"
        (dynamicSetIntervenient)="dynamicSetIntervenient($event)"
      >
      </app-attendee-modal>
    </div>
  </div>
</ion-content>
<ion-footer>
  <div class="buttons">
    <button class="btn-cancel" shape="round" (click)="cancelTask()">Cancelar</button>
    <button class="btn-ok" shape="round" (click)="saveTask()">Gravar</button>
  </div>
</ion-footer>

