<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>Delegar</label>
        </div>
      </div>
      <div>

        <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">
              <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" (click)="addParticipants()">
                <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="hideThisFeature" class="ion-item-container-no-border">
          <ion-label (click)="getDoc()" class="cursor-pointer">
            <div class="attach-icon">
              <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
              <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
            </div>
            <div class="attach-document">
              <ion-label>Anexar Documentos</ion-label>
            </div> 
          </ion-label>
        </div>

        <div *ngIf="hideThisFeature" class="content width-100 overflow-y-auto height-100">
          <div class="list">
            <ion-list  *ngFor="let document of documents; let i = index">
              <ion-item>
              <ion-label>
                <p class="d-flex ion-justify-content-between">
                  <span class="attach-title-item">{{document.Assunto}}</span>
                  <span class="app-name">{{document.appName}}</span>
                  <span class="close-button text-black cursor-pointer" (click)="removeAttachment(i)" >
                    <ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
                  </span>
                </p>
                <p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data | date: 'dd-MM-yyyy HH:mm'}} </span></p>
              </ion-label>
            </ion-item>
            </ion-list>
          </div>
        </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>

