<ion-view id="tab-settings" class="settings">
  <ion-nav-bar class="bar-royal">
    <ion-nav-title>{{'Global Settings' | translate}}</ion-nav-title>
  </ion-nav-bar>

  <ion-content>
    <div class="list">
      <div class="item item-divider"></div>
      <a class="item item-icon-left item-icon-right" ui-sref="tabs.addressbook">
        <i class="icon ion-ios-book-outline"></i>
        <span translate>Address Book</span>
        <i class="icon nav-item-arrow-right"></i>
      </a>

      <div class="item item-divider" translate>Preferences</div>

      <a class="item item-icon-left item-icon-right" ui-sref="tabs.language">
        <i class="icon ion-ios-chatbubble-outline"></i>
        <span translate>Language</span>
        <span class="item-note">
          {{currentLanguageName|translate}}
        </span>
        <i class="icon nav-item-arrow-right"></i>
      </a>

      <a class="item item-icon-left item-icon-right" ui-sref="tabs.unit">
        <i class="icon ion-ios-calculator-outline"></i>
        <span translate>Unit</span>
        <span class="item-note">
          {{unitName}}
        </span>
        <i class="icon nav-item-arrow-right"></i>
      </a>

      <a class="item item-icon-left item-icon-right" ui-sref="tabs.altCurrency">
        <i class="icon ion-social-usd-outline"></i>
        <span translate>Alternative Currency</span>
        <span class="item-note">
          {{selectedAlternative.name}}
        </span>
        <i class="icon nav-item-arrow-right"></i>
      </a>

      <a class="item item-icon-left item-icon-right" ui-sref="tabs.fee">
        <i class="icon ion-social-bitcoin-outline"></i>
        <span translate>Bitcoin Network Fee Policy</span>
        <span class="item-note">
          {{feeOpts[currentFeeLevel]|translate}}
        </span>
        <i class="icon nav-item-arrow-right"></i>
      </a>

      <div class="item item-divider" translate>Exchanges</div>

      <ion-toggle ng-show="!isWP" ng-model="glideraEnabled.value" toggle-class="toggle-balanced" ng-change="glideraChange()">
        <span class="toggle-label" translate>Enable Glidera Service</span>
      </ion-toggle>

      <!-- disable coinbase for this release -->
      <!--
      <ion-toggle ng-show="!isWP" ng-model="coinbaseEnabled" toggle-class="toggle-balanced" ng-change="coinbaseChange()">
        <span class="toggle-label" translate>Enable Coinbase Service</span>
      </ion-toggle>
      -->

      <div class="item item-divider" translate>Others</div>

      <ion-toggle ng-model="spendUnconfirmed.value" toggle-class="toggle-balanced" ng-change="spendUnconfirmedChange()">
        <span class="toggle-label" translate>Use Unconfirmed Funds</span>
      </ion-toggle>

      <div ng-show="usePushNotifications && PNEnabledByUser">
        <div class="item item-divider" translate>Notifications</div>

        <ion-toggle ng-model="pushNotifications.value" toggle-class="toggle-balanced" ng-change="pushNotificationsChange()">
          <span class="toggle-label" translate>Enable push notifications</span>
        </ion-toggle>
      </div>

      <div ng-show="usePushNotifications && !PNEnabledByUser && isIOSApp">
        <div class="item item-divider" translate>Notifications</div>
        <div class="padding text-light" translate>
          Push notifications for Copay are currently disabled. Enable them in the Settings app.
        </div>
        <a class="item" ng-click="openSettings()">
          <span translate>Open Settings app</span>
        </a>
      </div>

      <div class="item item-divider" translate>Wallets Preferences</div>
      <a class="item item-icon-left item-icon-right" href
           ui-sref="tabs.preferences({'walletId': item.id})"
           ng-repeat="item in wallets track by $index">
        <i class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i>
        {{item.name || item.id}}
        <span  ng-show="item.n > 1" class="text-light">
          {{item.m}}-of-{{item.n}}
        </span>
        <span class="right text-light assertive" ng-show="!item.isComplete()" translate>
          Incomplete
        </span>
        <i class="icon nav-item-arrow-right"></i>
      </a>

      <div class="item item-divider"></div>
      <a class="item item-icon-left item-icon-right" href ui-sref="tabs.about">
        <i class="icon ion-ios-information-outline"></i>
        <span translate>About</span> {{appName}}
        <i class="icon nav-item-arrow-right"></i>
      </a>
    </div>
  </ion-content>
</ion-view>
