{{#if this.isDistributing}} Destribute key to provider {{else if this.isShowing}} Provider {{@model.id}} {{else}} {{if this.isCreating "Create provider" "Update credentials"}} {{/if}}

{{#if this.isDistributing}} {{else}} {{#if this.isShowing}}
{{#unless this.viewingKeys}} {{#if @model.canDelete}} Delete provider {{#if @model.keys.length}}
This provider cannot be deleted until all {{@model.keys.length}} key(s) distributed to it are revoked. This can be done from the Keys tab.
{{/if}}
{{/if}} {{#if (and @model.canDelete (or @model.canListKeys @model.canEdit))}}
{{/if}} {{#if (or @model.canListKeys @model.canCreateKeys)}} {{/if}} {{#if @model.canEdit}} Update credentials {{/if}}
{{/unless}} {{else}}
{{#if this.isCreating}} {{#each @model.createFields as |attr index|}} {{#if (eq index 2)}}

Provider configuration

{{#if @model.provider}} {{! Only show last field if provider selected }} {{else}} {{/if}} {{else}} {{/if}} {{/each}} {{/if}} {{#unless this.isCreating}}

New credentials

Old credentials cannot be read and will be lost as soon as new ones are added. Do this carefully.

{{/unless}} {{#each @model.credentialFields as |cred|}} {{/each}}
Cancel
{{/if}} {{#if this.isShowing}}
{{#if this.viewingKeys}} {{#let (options-for-backend "keymgmt" "key") as |options|}} {{#if @model.keys.meta.total}} {{#each @model.keys as |key|}} {{/each}} {{#if (gt @model.keys.meta.lastPage 1)}} {{/if}} {{else}} Create key {{/if}} {{/let}} {{else}} {{#each @model.showFields as |attr|}} {{#if attr.hasBlock}} {{#if attr.icon}} {{/if}} {{#if attr.isLink}} {{attr.value}} {{else}} {{attr.value}} {{/if}} {{else}} {{/if}} {{/each}} {{/if}}
{{/if}} {{/if}}