<ion-header>
  <ion-navbar>
    <button ion-button menuToggle>
      <ion-icon name="menu"></ion-icon>
    </button>
    <ion-title>MI PERFIL</ion-title>
    <ion-buttons end>
    <button (tap)="presentMediaOptionsPopover($event)" ion-button icon-only>
      <ion-icon ios="ios-camera-outline" md="ios-camera-outline"></ion-icon>
    </button>
    </ion-buttons>
  </ion-navbar>

</ion-header>

<ion-content [ngClass]="{'blurred' : isBlurred}">

  <div *ngIf="loaded">
    <div class="mediaSlideContainer">
        <div class="media" [style.background-image]="'url(' + (me.avatar != '' && me.avatar != null ? me.avatar : 'assets/img/default/avatar.png' ) + ')'" style="background-size: cover;"></div>
    </div>
    <div class="name">
      {{ me.first_name }}
    </div>
    <div class="welcome">
      Información de mi cuenta
    </div>

    <div class="formContainer">
      <ion-item [hidden]="appInvite">
        <ion-label fixed>RUT</ion-label>
        <ion-input type="text" [(ngModel)]="me.card_code" disabled></ion-input>
      </ion-item>
      <ion-item>
        <ion-label fixed>Nombre</ion-label>
        <ion-input type="text" [(ngModel)]="me.first_name"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label fixed>Apellido</ion-label>
        <ion-input type="text" [(ngModel)]="me.last_name"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label fixed>Email</ion-label>
        <ion-input type="text" [(ngModel)]="me.email"></ion-input>
      </ion-item>
    </div>

    <div class="welcome">
      Seguridad
    </div>
    <div class="formContainer">
      <ion-item>
        <ion-label fixed>Contraseña</ion-label>
        <ion-label fixed><button (tap)="changePassword()" class="buttonPinkOrange" style="top: 7px; left: 124px;" ion-button round>Cambiar</button>
        </ion-label>
      </ion-item>


      <div class="buttonWrapper">
        <button (tap)="save()" class="buttonPinkOrange" ion-button round>{{ 'PET.UPDATE_INFO' | translate }}</button>
      </div>
    </div>
  </div>
</ion-content>
