{{#if (and plaintext ciphertext)}}
{{#copy-button clipboardTarget="#ciphertext" class="button is-primary" buttonType="button" success=(action (set-flash-message 'Ciphertext copied!')) }} Copy {{/copy-button}}
{{else}}
{{key-version-select key=key onVersionChange=(action (mut key_version)) key_version=key_version }}
{{textarea id="plaintext" value=plaintext class="textarea" data-test-transit-input="plaintext"}} {{b64-toggle value=plaintext isInput=false data-test-transit-b64-toggle="plaintext"}}
{{#if key.derived}}
{{input type="text" id="context" value=context class="input" data-test-transit-input="context"}}
{{b64-toggle value=context data-test-transit-b64-toggle="context"}}
{{/if}} {{#if (eq key.convergentEncryptionVersion 1)}}
{{b64-toggle value=nonce data-test-transit-b64-toggle="nonce"}}
{{input type="text" id="nonce" value=nonce class="input" data-test-transit-input="nonce"}}
{{/if}}
{{/if}}