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

<Secrets::DestinationHeader @destination={{@destination}} />

{{#each @destination.formFields as |field|}}
  {{#let (get @destination field.name) as |fieldValue|}}
    {{#if (includes field.name @destination.maskedParams)}}
      <InfoTableRow @label={{or field.options.label (to-label field.name)}}>
        <Hds::Badge @text={{this.credentialValue fieldValue}} @icon="check-circle" @color="success" />
      </InfoTableRow>
    {{else if (eq field.name "customTags")}}
      {{#unless (is-empty-value fieldValue)}}
        <Hds::Text::Display @tag="h3" @size="300" @weight="semibold" class="has-top-margin-l" data-test-section-header>
          Custom tags
        </Hds::Text::Display>
      {{/unless}}
      {{#each-in fieldValue as |key value|}}
        <InfoTableRow @alwaysRender={{false}} @label={{key}} @value={{value}} />
      {{/each-in}}
    {{else}}
      <InfoTableRow @label={{or field.options.label (to-label field.name)}} @value={{fieldValue}} />
    {{/if}}
  {{/let}}
{{/each}}