<div class="panel panel-default" ng-switch on="panel.type" ng-if="savedObj || error">
  <div class="panel-heading">
    <span class="panel-title" title="{{::savedObj.title}}">
      <i
        class="fa"
        ng-class="savedObj.vis.type.icon"
        aria-label="{{::savedObj.vis.type.title}} Icon"
        title="{{::savedObj.vis.type.title}}">
      </i>
      {{::savedObj.title}}
    </span>
    <div class="btn-group">
      <a aria-label="Edit" ng-show="chrome.getVisible() && editUrl" ng-href="{{::editUrl}}">
        <i aria-hidden="true" class="fa fa-pencil"></i>
      </a>
      <a aria-label="Remove" ng-show="chrome.getVisible()" ng-click="remove()">
        <i aria-hidden="true" class="fa fa-times"></i>
      </a>
    </div>
    <div class="clearfix"></div>
  </div>

  <div ng-if="error" class="load-error">
    <i aria-hidden="true" class="fa fa-exclamation-triangle"></i>
    <span ng-bind="error"></span>
  </div>

  <visualize
    ng-switch-when="visualization"
    vis="savedObj.vis"
    search-source="savedObj.searchSource"
    show-spy-panel="chrome.getVisible()"
    ui-state="uiState"
    class="panel-content">
  </visualize>

  <doc-table ng-switch-when="search"
    search-source="savedObj.searchSource"
    sorting="panel.sort"
    columns="panel.columns"
    class="panel-content"
    filter="filter">
  </doc-table>
</div>
