<fieldset id="crm-search-admin-debug">
  <legend ng-click="$ctrl.showDebug = !$ctrl.showDebug">
    <i class="crm-i fa-caret-{{ !$ctrl.showDebug ? 'right' : 'down' }}"></i>
    {{:: ts('Query Info') }}
  </legend>
  <div ng-if="$ctrl.showDebug">
    <pre ng-if="$ctrl.debug.timeIndex">{{ ts('Request took %1 seconds.', {1: $ctrl.debug.timeIndex}) }}</pre>
    <div>
      <strong>API:</strong>
    </div>
    <pre>{{ $ctrl.debug.apiParams }}</pre>
    <div ng-if="$ctrl.debug.sql">
      <strong>SQL:</strong>
    </div>
    <pre ng-repeat="query in $ctrl.debug.sql">{{ query }}</pre>
  </div>
</fieldset>
