<li
  class="sidebar-item"
  attr-field="{{::field.name}}"
>
  <div
    data-test-subj="field-{{::field.name}}"
    ng-click="onClickToggleDetails($event, field)"
    kbn-accessible-click
    class="sidebar-item-title dscSidebarItem"
  >
    <field-name
      class="dscField dscSidebarItem__label"
      field="field"
    ></field-name>

    <button
      ng-if="field.name !== '_source'"
      ng-click="toggleDisplay(field)"
      ng-class="::field.display ? 'kuiButton--danger' : 'kuiButton--primary'"
      ng-bind="::field.display ? 'remove' : 'add'"
      class="dscSidebarItem__action kuiButton kuiButton--small"
      data-test-subj="fieldToggle-{{::field.name}}"
    ></button>
  </div>
</li>
