{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
~}}

{{#if this.model.canUpdateMetadata}}
  <PageHeader as |p|>
    <p.levelLeft>
      <h1 class="title is-3">
        Edit Secret Metadata
      </h1>
    </p.levelLeft>
  </PageHeader>
  <SecretEditMetadata @model={{this.model}} />
{{else}}
  <EmptyState
    @title="You do not have permissions to edit metadata"
    @message="Ask your administrator if you think you should have access."
  >
    <LinkTo @route="vault.cluster.secrets.backend.metadata" @model={{this.model.id}} class="link">
      View Metadata
    </LinkTo>
    <DocLink @path="/vault/api-docs/secret/kv/kv-v2#create-update-metadata">More here</DocLink>
  </EmptyState>
{{/if}}