<ion-header>
  <ion-toolbar>
    <ion-menu-button slot="start">
      <ion-icon name="menu"></ion-icon>
    </ion-menu-button>
    <ion-title>
      {{'Settings'| translate }}
    </ion-title>
    <ion-buttons slot="end">
      <ion-button fill="clear" routerLink="/search" routerDirection="forward">
        <ion-icon slot="icon-only" name="search"></ion-icon>
      </ion-button>
      <ion-button fill="clear" routerLink="/cart" routerDirection="forward">
        <ion-icon name="basket"></ion-icon>
        <ion-badge color="secondary">{{shared.cartTotalItems()}}</ion-badge>
      </ion-button>
    </ion-buttons>
  </ion-toolbar>
</ion-header>

<ion-content class="setting-page">
  <ion-row class="row-img">
    <img src="assets/icons_stripe.svg" />
  </ion-row>
  <ion-row>
    <div></div>
  </ion-row>
  <ion-grid class="ion-padding">
    <ion-row size="12">
      <ion-col *ngIf="checkAvatar()=='false'" class="ion-no-padding">
        <ion-avatar>
          <ion-icon class="avatar-icon" name="contact"></ion-icon>
        </ion-avatar>
      </ion-col>
      <ion-col class="ion-no-padding" *ngIf="checkAvatar()!='false'">
        <ion-avatar>
          <div id="nametxt">{{getNameFirstLetter()}}</div>
        </ion-avatar>
      </ion-col>
    </ion-row>
    <ion-row *ngIf="shared.customerData.id==null" (click)="openLoginPage()">
      <ion-col size="12" class="ion-no-padding">
        <h2>{{ 'Login & Register' | translate }}</h2>
        <p>{{ 'Please login or create an account for free' | translate }}</p>
      </ion-col>
    </ion-row>
    <ion-row *ngIf="shared.customerData.id!=null">
      <ion-col size="12" class="ion-no-padding">
        <h2>{{shared.customerData.first_name +"&nbsp;"+shared.customerData.last_name}}</h2>
        <p>{{shared.customerData.email}}</p>
        <ion-button (click)="openAccountPage()">{{'Edit Profile' | translate }}</ion-button>
      </ion-col>
    </ion-row>
  </ion-grid>
  <ion-list class="ion-padding">
    <ion-item lines="none">
      <ion-label>
        <p>{{"Turn on/off Notifications"|translate}}</p>
      </ion-label>
      <ion-toggle [(ngModel)]="setting.notification" (ionChange)="onOffPushNotification(setting.notification)">
      </ion-toggle>
    </ion-item>
  </ion-list>
  <ion-list class="ion-padding">
    <ion-item lines="full" (click)="openSite()">
      <ion-label>
        <p>{{"Official Website"|translate}}</p>
      </ion-label>
      <ion-icon slot="end" name="arrow-forward"></ion-icon>
    </ion-item>
    <ion-item lines="full" (click)="showModal('privacyPolicy')">
      <ion-label>
        <p>{{"Privacy Policy"|translate}}</p>
      </ion-label>
      <ion-icon slot="end" name="arrow-forward"></ion-icon>
    </ion-item>
    <ion-item lines="full" (click)="showModal('refundPolicy')">
      <ion-label>
        <p>{{"Refund Policy"|translate}}</p>
      </ion-label>
      <ion-icon slot="end" name="arrow-forward"></ion-icon>
    </ion-item>
    <ion-item lines="full" (click)="showModal('termServices')">
      <ion-label>
        <p>{{"Terms and Services"|translate}}</p>
      </ion-label>
      <ion-icon slot="end" name="arrow-forward"></ion-icon>
    </ion-item>
    <ion-item lines="full" (click)="rateUs()">
      <ion-label>
        <p>{{"Rate Us"|translate}}</p>
      </ion-label>
      <ion-icon slot="end" name="star-half"></ion-icon>
    </ion-item>
    <ion-item lines="full" (click)="share()">
      <ion-label>
        <p>{{"Share"|translate}}</p>
      </ion-label>
      <ion-icon slot="end" name="share"></ion-icon>
    </ion-item>
  </ion-list>
  <ion-item lines="none" *ngIf="shared.customerData.id!=null">
    <ion-button color="secondary" (click)="logOut()">{{'Log Out' | translate }}</ion-button>
  </ion-item>
</ion-content>
Î