{{#if (gt this.key.keysForEncryption.length 1)}}
<div class="field" data-test-transit-key-version-select={{true}}>
<label for="key_version" class="is-label">Key version</label>
<div class="control is-expanded">
<div class="select is-fullwidth">
<select name="key_version" id="key_version" onchange={{action this.onVersionChange value="target.value"}}>
{{#each this.key.keysForEncryption as |version|}}
{{#if (eq version this.key.latestVersion)}}
<option
selected={{if this.key_version (eq version this.key_version) (eq version this.key.latestVersion)}}
value={{0}}
>
{{version}}
(latest)
</option>
{{else}}
value={{version}}
{{/if}}
{{/each}}
</select>
</div>