<ion-view class="settings">
  <ion-nav-bar class="bar-royal">
    <ion-nav-title>
      {{'Alternative Currency'|translate}}
    </ion-nav-title>
    <ion-nav-back-button>
    </ion-nav-back-button>
  </ion-nav-bar>
  <ion-content>
    <div class="bar bar-header item-input-inset m20b">
      <label class="item-input-wrapper">
        <i class="icon ion-ios-search placeholder-icon"></i>
        <input type="search" ng-init="searchedAltCurrency = ''" ng-model="searchedAltCurrency" ng-change="findCurrency(searchedAltCurrency)"
          placeholder="{{'Search your currency' | translate}}">
      </label>
    </div>
    <div class="list" ng-if="lastUsedAltCurrencyList[0]">
      <ion-radio ng-repeat="lastUsedAltCurrency in lastUsedAltCurrencyList" ng-value="lastUsedAltCurrency.isoCode" ng-model="currentCurrency"
        ng-click="save(lastUsedAltCurrency)">{{lastUsedAltCurrency.name}}
      </ion-radio>
    </div>
    <div class="list">
      <ion-radio ng-repeat="altCurrency in altCurrencyList" ng-value="altCurrency.isoCode" ng-model="currentCurrency"
        ng-click="save(altCurrency)">{{altCurrency.name}}
      </ion-radio>
    </div>
    <ion-infinite-scroll
     ng-if="!listComplete"
     on-infinite="loadMore()"
     distance="50%">
   </ion-infinite-scroll>
  </ion-content>
</ion-view>
