<PageHeader as |p|>
  <p.top>
    <Page::Breadcrumbs @breadcrumbs={{@breadcrumbs}} />
  </p.top>
  <p.levelLeft>
    <h1 class="title is-3" data-test-pki-page-title>
      {{this.title}}
    </h1>
  </p.levelLeft>
</PageHeader>

{{#if @model.id}}
  <Toolbar />
{{/if}}
{{#if @model.privateKey}}
  <div class="has-top-margin-m">
    <AlertBanner
      @title="Next steps"
      @type="warning"
      @message="The private_key is only available once. Make sure you copy and save it now."
    />
  </div>
{{/if}}
<PkiGenerateRoot
  @model={{@model}}
  @onCancel={{transition-to "vault.cluster.secrets.backend.pki.issuers.index"}}
  @onComplete={{transition-to "vault.cluster.secrets.backend.pki.issuers.index"}}
  @onSave={{fn (mut this.title) "View generated root"}}
  @adapterOptions={{hash actionType="generate-root" useIssuer=@model.canGenerateIssuerRoot}}
/>