{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}

{{=<% %>=}}
{{^searchpaneldisabled}}
<div class="treasurehunt-play-search-page">

  <ion-searchbar class="searchbar" placeholder="{{'plugin.mod_treasurehunt.findplace' | translate}}" [(ngModel)]="searchText"
    (ionInput)="searchLocation()" (ionCancel)="cancelSearch()">
  </ion-searchbar>

  <!-- Show loading spinner on search -->
  <div class="loading-spinner" *ngIf="loading">
    <ion-spinner></ion-spinner>
  </div>

  <ion-list *ngIf="!loading">
    <ion-item text-wrap *ngIf="places.length === 0 && searchText.length > minSearch">
      {{'plugin.mod_treasurehunt.noresults' | translate}}
    </ion-item>
    <button ion-item text-wrap *ngFor="let place of places" (click)="zoomToPlace(place)">
      <ion-icon name="pin" item-start color="primary"></ion-icon>
      <ion-label>{{ place.display_name }}</ion-label>
    </button>
  </ion-list>

</div>
{{/searchpaneldisabled}}