<ion-view id="tab-receive">
  <ion-nav-bar class="bar-royal">
    <ion-nav-title>{{'Receive' | translate}}</ion-nav-title>
  </ion-nav-bar>
  <ion-content scroll="false">
    <div class="list card padding text-center" ng-if="!wallets[0]">
      <span translate>No Wallet</span>
    </div>
    <div id="address" ng-if="wallets[0]">
      <article class="text-center" ng-if="!wallet">
        <div class="row qr">
          <div class="text-center col center-block">
            <div style="height:225px; width:220px; margin:auto; background: white; padding-top: 25%;">
              ...
            </div>
          </div>
        </div>
        <div class="row border-top">
          <div class="col col-90 center-block bit-address text-center">
            <div class="item item-icon-left">
              <i class="icon icon-svg receive-tab-bitcoin-icon"><img src="img/icon-bitcoin-symbol.svg"></i>
              <span class="bit-address-gen-address">...</span>
            </div>
          </div>
        </div>
      </article>
      <article class="text-center" ng-if="wallet && !wallet.isComplete()">
        <div class="incomplete">
          <div class="title">
            <span translate>Incomplete wallet</span>
          </div>
          <div class="subtitle">
            <span translate>All signing devices must be added to this multisig wallet before bitcoin addresses can be created.</span>
          </div>
          <div>
            <button class="button button-standard button-primary" ng-click="goCopayers()" translate>Open wallet</button>
          </div>
        </div>
        <div class="row border-top">
          <div class="col col-90 center-block bit-address text-center">
            <div class="item item-icon-left">
              <i class="icon icon-svg receive-tab-bitcoin-icon"><img src="img/icon-bitcoin-symbol.svg"></i>
              <span class="bit-address-gen-address" ng-if="!generatingAddress" translate>address not yet available</span>
            </div>
          </div>
        </div>
      </article>
      <article ng-if="wallet && wallet.isComplete()">
        <div class="row backup" ng-show="wallet.needsBackup" ng-click="openBackupNeededModal()">
          <div class="text-center col center-block">
            <i class="icon ion-alert"></i><span translate>Wallet not backed up</span><i class="icon ion-ios-arrow-thin-right"></i>
          </div>
        </div>
        <div class="row qr">
          <div class="text-center col center-block" copy-to-clipboard="addr">
            <qrcode ng-if="addr" size="220" data="bitcoin:{{addr}}" color="#334"></qrcode>
            <div ng-if="!addr" style="height:225px; width:220px; margin:auto; background: white; padding-top: 25%;">
              ...
            </div>
          </div>
        </div>
        <div id="qr-options" class="row text-center">
          <div class="item item-icon-left" ng-click="shareAddress(addr)" ng-show="isCordova && addr">
            <i class="icon ion-ios-upload-outline"></i>
            <span translate>Share</span>
          </div>
          <div ng-class="{'center-block': !isCordova || !addr}">
            <div class="item item-icon-left" ng-click="setAddress(true)">
              <i class="icon ion-ios-loop"></i>
              <span translate>Next Address</span>
            </div>
          </div>
        </div>
        <div id="bit-address" class="row border-top">
          <div class="col col-90 center-block bit-address text-center">
            <div class="item item-icon-left item-icon-right">
              <i class="icon icon-svg receive-tab-bitcoin-icon"><img src="img/icon-bitcoin-symbol.svg"></i>
              <span class="bit-address-gen-address" ng-if="generatingAddress">...</span>
              <span class="bit-address-gen-address" ng-if="!generatingAddress" copy-to-clipboard="addr">{{addr}}</span>
            </div>
          </div>
        </div>
      </article>
    </div>
    <article id="wallets" ng-if="wallets[0]">
      <div class="list">
        <wallets wallets="wallets"></wallets>
      </div>
    </article>
  </ion-content>
</ion-view>
