{{#if (eq this.mode "create")}} Create an AWS Role {{else if (eq this.mode "edit")}} Edit AWS Role {{this.model.id}} {{else}} AWS Role {{this.model.id}} {{/if}}

{{#if (eq this.mode "show")}} {{#if this.model.canDelete}} Delete role
{{/if}} {{#if this.model.canGenerate}} Generate credentials {{/if}} {{#if this.model.canEdit}} Edit role {{/if}}
{{/if}} {{#if (or (eq this.mode "edit") (eq this.mode "create"))}}
{{#if (gt this.model.credentialTypes.length 1)}} {{/if}} {{#each (if (eq this.mode "edit") (drop 1 (or this.model.fields (array))) this.model.fields) as |attr|}} {{/each}}
Cancel
{{else}}
{{#if (gt this.model.credentialTypes.length 1)}} {{/if}} {{#each this.model.fields as |attr|}} {{#if (eq attr.name "policyDocument")}}
{{stringify (jsonify this.model.policyDocument)}}
{{else}} {{/if}} {{/each}}
{{/if}}