{{!
  Copyright IBM Corp. 2016, 2025
  SPDX-License-Identifier: BUSL-1.1
}}

{{#if this.hasGenerated}}
  <DetailsCredentials @credentials={{@credentials}} @onRevokeCredentials={{this.revokeCredentials}} />
{{else}}
  <EditForm
    @model={{@credentials}}
    @onSave={{fn (mut this.hasGenerated) true}}
    @callOnSaveAfterRender={{true}}
    @successMessage="Successfully generated credentials from role: {{@credentials.role}}!"
    @cancelLinkParams={{array "credentials.index"}}
  />
{{/if}}