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

<Secrets::DestinationHeader @destination={{@destination}} @capabilities={{@capabilities}} />
{{#each this.displayFields as |field|}}
  {{#let (get @destination field) as |fieldValue|}}
    {{#if (this.isMasked field)}}
      <InfoTableRow @label={{this.fieldLabel field}}>
        <Hds::Badge @text={{this.credentialValue fieldValue}} @icon="check-circle" @color="success" />
      </InfoTableRow>
    {{else if (eq field "options.custom_tags")}}
      {{#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={{this.fieldLabel field}} @value={{fieldValue}} />
    {{/if}}
  {{/let}}
{{/each}}