{{message-error model=model}} {{#with (if (eq model.keyType 'otp') 3 4) as |numRequired|}} {{#each (take numRequired model.attrsForKeyType) as |attr|}} {{#unless (and (eq mode 'edit') (eq attr.name 'name'))}} {{partial "partials/form-field-from-model"}} {{/unless}} {{/each}} {{toggle-button toggleAttr="showOptions" toggleTarget=this openLabel="Hide options" closedLabel="More options" data-test-toggle-more="true" }} {{#if showOptions}}
{{#each (drop numRequired model.attrsForKeyType) as |attr|}} {{partial "partials/form-field-from-model"}} {{/each}}
{{/if}} {{/with}}
{{#secret-link mode=(if (eq mode "create") "list" "show") class="button" secret=model.id }} Cancel {{/secret-link}}
{{#if (and (eq mode 'edit') model.canDelete)}} {{#confirm-action buttonClasses="button" onConfirmAction=(action "delete") confirmMessage=(concat "Are you sure you want to delete " model.id "?") cancelButtonText="Cancel" }} Delete {{/confirm-action}} {{/if}}