<ion-header *ngIf="task" class="ion-no-border">
  <div class="main-header">
    <div class="title-content width-100 d-flex justify-space-between align-center">
      <div class=" btn-dismiss font-30 cursor-pointer" (click)="goBack.emit()" defaultHref="#">
        <ion-icon  *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
        <ion-icon  *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
      </div>
      <div class="middle d-flex align-center flex-grow-1">
        <ion-label class="title">{{ task.Folio}}</ion-label>
      </div>
      <div class="div-icon" (click)="openOptions.emit()">
        <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
        <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
      </div>
    </div>
  </div>
  <div class="upper-content">
    <div class="content-details">
      <ion-label>
        <p><span class="date">{{customDate}}</span><span class="label">{{ task.activityInstanceName }}</span></p>
        <p><span class="color-red">{{ fulltask.workflowInstanceDataFields.DeadlineType }}</span></p>
      </ion-label>
    </div>
  </div>
  <div class="line"></div>
</ion-header>

<ion-content>
  <div *ngIf="task" class="overflow-y-auto" style="margin-right: -20px; margin-right: -20px;">
    <div class="middle-content">
      <h5 *ngIf="intervenientes">Intervenientes</h5>
      <ion-item class="ion-no-margin ion-no-padding">
        <ion-label>
          <div *ngFor="let interveniente of intervenientes">
            <p>{{interveniente.Name}}</p>
          </div>
        </ion-label>
      </ion-item>
      <div *ngIf="cc.length > 0">
        <h5>Com conhecimento</h5>
        <ion-item class="ion-no-margin ion-no-padding">
          <ion-label>
            <div *ngFor="let c of cc">
              <p>{{c.Name}}</p>
            </div>
          </ion-label>
        </ion-item>
      </div>
      <div *ngIf="fulltask.workflowInstanceDataFields.TaskMessage">
        <h5>Detalhes</h5>
        <ion-item class="ion-no-margin ion-no-padding">
            <p [innerHTML]="fulltask.workflowInstanceDataFields.TaskMessage"></p>
        </ion-item>
      </div>
    </div>
    <div class="bottom-content width-100">
      <ion-list>
        <h5>Documentos Anexados</h5>
        <ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
          <ion-label class="d-block" (click)="viewDocument.emit(Document.DocId)">
            <p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
            <p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
          </ion-label>
        </ion-item>
      </ion-list>
    </div>
  </div>
</ion-content>
