{{#unless (eq tab 'actions')}} {{#if (eq tab 'versions')}} {{/if}} {{#if (eq mode "show") }} {{#if (or capabilities.canUpdate capabilities.canDelete)}} Edit encryption key {{/if}} {{/if}} {{/unless}} {{#if (eq tab 'actions')}}
{{#each model.supportedActions as |supportedAction|}} {{#linked-block "vault.cluster.secrets.backend.actions" model.id queryParams=(hash action=supportedAction.name) class="transit-card" data-test-transit-card=supportedAction.name }}

{{if (eq supportedAction.name 'export') 'Export Key' (humanize supportedAction.name)}}

{{supportedAction.description}}

{{/linked-block}} {{/each}}
{{else if (eq tab 'versions')}} {{#if (or (eq key.type "aes256-gcm96") (eq key.type "chacha20-poly1305") ) }}
Version
Created at
{{#each-in key.keys as |version creationTimestamp|}}
{{version}} {{#if (coerce-eq key.minDecryptionVersion version)}}

(current minimum decryption version)

{{/if}}
{{date-format creationTimestamp 'MMM DD, YYYY hh:mm:ss A'}}
{{date-format creationTimestamp }}
{{/each-in}} {{else}}
Version
Name
Created at
{{#each-in key.keys as |version meta|}}
{{version}} {{#if (coerce-eq key.minDecryptionVersion version)}}

(current minimum decryption version)

{{/if}}
{{meta.name}}
{{date-format meta.creation_time 'MMM DD, YYYY hh:mm:ss A'}}
{{date-format meta.creation_time}}
{{#if (get this (concat version '-open'))}}
Public Key
{{meta.public_key}}
{{#copy-button clipboardText=meta.public_key class="button" buttonType="button" success=(action (set-flash-message (concat 'Public key for version ' version ' copied!'))) }} Copy {{/copy-button}}
{{/if}} {{/each-in}} {{/if}} {{else}} {{info-table-row label="Type" value=key.type}} {{info-table-row label="Deletion allowed" value=(stringify key.deletionAllowed)}} {{#if key.derived}} {{info-table-row label="Derived" value=key.derived}} {{info-table-row label="Convergent encryption" value=key.convergentEncryption}} {{/if}} {{/if}}