<div class="ion-autocomplete-container {{viewModel.randomCssClass}} modal" style="display: none;" id="autocomplete-search-opp">
  <div class="bar bar-header item-input-inset">
    <label class="item-input-wrapper">
      <i class="icon ion-search placeholder-icon"></i>
      <input class="ion-autocomplete-search" ng-model="viewModel.searchQuery" placeholder="{{viewModel.placeholder}}" type="search"/>
 </label>
 <div class="ion-autocomplete-loading-icon" ng-if="viewModel.showLoadingIcon && viewModel.loadingIcon">
      <ion-spinner icon="{{viewModel.loadingIcon}}"></ion-spinner>
 </div>
 <button class="ion-autocomplete-cancel button button-clear" ng-click="viewModel.cancelClick()">{{viewModel.cancelLabel}}</button>
</div>
<ion-content class="has-header">
    <ion-item class="item-divider" ng-show="viewModel.selectedItems.length <= 1">{{viewModel.selectedItemsLabel}}</ion-item>
     <div ng-repeat="item2 in viewModel.searchItems" ng-if="$index==0">
        <div ng-if="item2.pending>0"> Pending
          <ion-item  ng-if="item.tabCurrent=='Pending'" ng-repeat="item in viewModel.searchItems" item-height="55px" item-width="100%" >
             <p ng-click="viewModel.selectItem(item)">{{item.name}}</p>      
          </ion-item>
        </div>
         <div ng-if="item2.followup>0"> Follow-Up
              <ion-item ng-if="item.tabCurrent=='Follow-Up'" ng-repeat="item in viewModel.searchItems"  item-height="55px" item-width="100%" >
                   <p ng-click="viewModel.selectItem(item)">{{item.name}}</p>      
              </ion-item>
         </div >
         <div ng-if="item2.fail>0"> Fail
              <ion-item  ng-show="item.tabCurrent=='Fail'" ng-repeat="item in viewModel.searchItems" item-height="55px" item-width="100%" >
                   <p ng-click="viewModel.selectItem(item)">{{item.name}}</p>      
              </ion-item>
         </div>
         <div ng-if="item2.success>0"> Success
              <ion-item  ng-show="item.tabCurrent=='Success'" ng-repeat="item in viewModel.searchItems" item-height="55px" item-width="100%" >
                   <p ng-click="viewModel.selectItem(item)">{{item.name}}</p>      
              </ion-item>
         </div>
         <div ng-if="item2.other>0"> Other
              <ion-item  ng-show="item.tabCurrent=='Other'" ng-repeat="item in viewModel.searchItems" item-height="55px" item-width="100%" >
                   <p ng-click="viewModel.selectItem(item)">{{item.name}}</p>      
              </ion-item>
         </div>
         <!-- <div ng-if="item2.followup == 0 && item2.fail == 0 && item2.pending == 0">
              <ion-item item-height="55px" item-width="100%">
                  <p style="color: red;">No matching search results found.</p>
              </ion-item>
       </div> -->
     </div>
      <ion-item item-height="55px" item-width="100%" class="item-text-wrap none-result" style="display: none">
          <p style="color: red;">No matching search results found.</p>
      </ion-item>
</ion-content>
</div>
