<ion-view title="Clientes">

    <ion-nav-buttons side="right">
        <button class="button button-clear ion-plus-round bar-icon" ng-click="show()"></i></button>
    </ion-nav-buttons>

    <ion-content>

        <ion-refresher pulling-text="Actualizar" on-refresh="fill(true)"></ion-refresher>
        <ion-spinner class="centered-spinner" ng-show="loading"></ion-spinner>

        <ion-list type="card" ng-show="!customers || customers.length != 0">
          <ion-item class="item-avatar" on-hold="openOptions($index)" ng-repeat="c in customers">
              <img ng-src="data:image/png;base64,{{ c.image_small || '[encoded data, 16204 characters]' }}">
              <h2><strong>{{ c.name }}</strong></h2>
              <p><strong>Teléfono:</strong> {{ c.phone }}</p>
              <p><strong>Celular:</strong> {{ c.mobile }}</p>
              <p><strong>Email:</strong> {{ c.email }}</p>
              <span class="badge badge-positive">{{ c.opportunity_count || 0 }} </span>
          </ion-item>
        </ion-list>

        <div class="" ng-show="!loading && (customers == undefined || customers.length == 0)">
            <img ng-src="data:image/png;base64,[encoded data, 24840 characters]" class="empty-data">
        </div>

    </ion-content>
</ion-view>
