{{#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}}

{{transit-key-actions key=key selectedAction="rotate" capabilities=capabilities onRefresh=(action "refresh") }}

{{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}}