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

<Page::Header
  @title="{{@secretsEngine.id}} configuration"
  @description="KMIP"
  @icon={{@secretsEngine.icon}}
  @configRoute="configure"
>
  <:breadcrumbs>
    <KmipBreadcrumb @showPath={{true}} @currentRoute="Configure" />
  </:breadcrumbs>
  <:actions>
    <Hds::Button @color="secondary" @route="scopes" @text="Exit configuration" data-test-button="Exit configuration" />
  </:actions>
</Page::Header>
<KmipTabs @path={{@secretsEngine.id}} @configRoute="configure" />

<form {{on "submit" (perform this.save)}}>
  <div class="box is-sideless is-fullwidth is-marginless">
    <MessageError @errorMessage={{this.errorMessage}} />
    <NamespaceReminder @mode="save" />

    {{#each @form.formFields as |field|}}
      <FormField @attr={{field}} @model={{@form}} @modelValidations={{this.modelValidations}} />
    {{/each}}
  </div>

  <FormSaveButtons @isSaving={{this.save.isRunning}} @cancelLinkParams={{array "configuration"}} @onCancel={{@onCancel}}>
    <:error>
      {{#if this.invalidFormAlert}}
        <AlertInline @type="danger" class="has-top-padding-s" @message={{this.invalidFormAlert}} />
      {{/if}}
    </:error>
  </FormSaveButtons>
</form>