<ion-view class="settings">
  <ion-nav-bar class="bar-royal">
    <ion-nav-title>
      {{'Wallet Preferences'|translate}}
    </ion-nav-title>
    <ion-nav-back-button>
    </ion-nav-back-button>
  </ion-nav-bar>
  <ion-content>
    <div class="list">
      <div class="item item-divider"></div>
      <a class="item item-icon-right" ui-sref="tabs.preferences.preferencesAlias">
        <span translate>Name</span>
        <span class="item-note">
          {{wallet.name}}
        </span>
        <i class="icon nav-item-arrow-right"></i>
      </a>
      <a class="item" ng-show="wallet.isPrivKeyExternal()">
        <span translate>Hardware Wallet</span>
        <span class="item-note">
          {{externalSource}}
        </span>
      </div>
      <a class="item item-icon-right" ui-sref="tabs.preferences.preferencesColor">
        <span translate>Color</span>
        <span class="item-note" ng-style="{'color': wallet.color}">
          &block;
        </span>
        <i class="icon nav-item-arrow-right"></i>
      </a>
      <a class="item item-icon-right" ui-sref="tabs.preferences.preferencesEmail">
        <span translate>Email Notifications</span>
        <span class="item-note">
          <span ng-if="!wallet.email" translate>Disabled</span>
          <span ng-if="wallet.email">{{wallet.email}}</span>
        </span>
        <i class="icon nav-item-arrow-right"></i>
      </a>
      <div class="item item-divider" translate>
        Security
      </div>
      <a class="item item-icon-right" ui-sref="tabs.preferences.backupWarning({from: 'tabs.preferences'})" ng-hide="wallet.isPrivKeyExternal()">
        <span translate>Backup</span>
        <i class="icon nav-item-arrow-right"></i>
      </a>
      <div ng-show="wallet.canSign()">
        <ion-toggle ng-model="encryptEnabled.value" toggle-class="toggle-balanced" ng-change="encryptChange()">
          <span class="toggle-label" translate>Request Spending Password</span>
        </ion-toggle>
      </div>
      <div ng-show="wallet.canSign() && touchIdAvailable">
        <ion-toggle  ng-model="touchIdEnabled.value" toggle-class="toggle-balanced" ng-change="touchIdChange()">
          <span class="toggle-label" translate>Request Fingerprint</span>
        </ion-toggle>
      </div>
      <a class="item item-icon-right" ui-sref="tabs.preferences.deleteWords" ng-show ="!deleted">
        <span translate>Delete recovery phrase</span>
        <i class="icon nav-item-arrow-right"></i>
      </a>
      <div class="item item-divider"></div>
      <a class="item item-icon-right" ui-sref="tabs.preferences.preferencesAdvanced">
        <span translate>Advanced</span>
        <i class="icon nav-item-arrow-right"></i>
      </a>
    </div>
  </ion-content>
</ion-view>
