<ion-header class="ion-no-border width-100">
  <div class="header-content pb-20 width-100">
    <div class="header-title width-100">
      <label>Adicionar comentário</label>
    </div>
  </div>
  <div class="ion-input-class-no-height">
    <ion-textarea [(ngModel)]="note" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
  </div>

  <div *ngIf="hideThisFeature" class="ion-item-container-no-border">
    <ion-label class="attach-wrapper d-flex align-center cursor-pointer" (click)="getDoc()">
      <button class="btn-no-color">
      <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 pl-10 ">
        <ion-label>Anexar Documentos</ion-label>
      </div>
    </button>
    </ion-label>
    <ion-label *ngIf="documents.length > 0">Documentos anexados</ion-label>
  </div>

</ion-header>

<ion-content>
  <div 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>
</ion-content>
<ion-footer class="ion-no-border">
  <div class="buttons width-100">
    <button class="btn-cancel cursor-pointer" shape="round" (click)="close()">Cancelar</button>
    <button class="btn-ok cursor-pointer" shape="round" (click)="save()">Gravar</button>
  </div>
</ion-footer>
