<section class="header clearfix">
  <div class="right-buttons">
    {{#link-to-external
       "nodes.node-templates"
       classNames="btn btn-sm bg-primary"
    }}
      <i class="icon icon-gear"/>
      {{t "cloudCredentialsPage.rightButtons.nodeTemplates"}}
    {{/link-to-external}}
    <button
      {{action "addCloudKey"}}
      class="btn btn-sm bg-primary right-divider-btn"
      disabled={{rbac-prevents resource="cloudcredential" scope="global" permission="create"}}
    >
      {{t "cloudCredentialsPage.rightButtons.addKey"}}
    </button>
  </div>

  <h1>
    {{t "cloudCredentialsPage.header"}}
  </h1>

</section>

<section class="instances">
  {{#sortable-table
     body=filteredContent
     bulkActions=true
     classNames="grid sortable-table"
     descending=descending
     extraSearchFields=extraSearchFields
     groupByKey="displayType"
     groupByRef="type"
     headers=headers
     rightActions=true
     searchText=searchText
     showHeader=true
     sortBy=sortBy
     as |sortable kind row dt|
  }}
    {{#if (eq kind "row")}}
      <tr class="main-row">
        <td valign="middle" class="row-check" style="padding-top: 2px;">
          {{check-box nodeId=row.id}}
        </td>
        <td data-title="{{t "generic.name"}}:" class="clip">
          {{row.displayName}}
        </td>
        <td data-title="{{t "generic.created"}}:" class="text-right pr-20">
          {{date-calendar row.created}}
        </td>
        <td data-title="{{t "generic.actions"}}:" class="actions">
          {{action-menu model=row}}
        </td>
      </tr>
    {{else if (eq kind "group")}}
      <tr class="group-row">
        <td colspan="{{sortable.fullColspan}}" class="pl-10">
          {{row.group}}
        </td>
      </tr>
    {{else if (eq kind "nomatch")}}
      <td
        colspan="5"
        class="text-center text-muted lacsso pt-20 pb-20"
      >
        {{t "cloudCredentialsPage.index.table.noMatch"}}
      </td>
    {{else if (eq kind "norows")}}
      <td
        colspan="5"
        class="text-center text-muted lacsso pt-20 pb-20"
      >
        {{t "cloudCredentialsPage.index.table.noData"}}
      </td>
    {{/if}}
  {{/sortable-table}}
</section>