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

<Toolbar>
  <ToolbarActions>
    {{#if (and (not-eq this.model.name "default") this.model.canDelete)}}
      <ConfirmAction
        data-test-oidc-provider-delete
        @buttonText="Delete provider"
        class="toolbar-button"
        @buttonColor="secondary"
        @onConfirmAction={{this.delete}}
        @confirmTitle="Delete provider?"
        @confirmMessage="This provider will be permanently deleted. You will need to re-create it to use it again."
      />
      <div class="toolbar-separator"></div>
    {{/if}}
    {{#if this.model.canEdit}}
      <ToolbarLink
        @route="vault.cluster.access.oidc.providers.provider.edit"
        @model={{this.model.name}}
        data-test-oidc-provider-edit
      >
        Edit provider
      </ToolbarLink>
    {{/if}}
  </ToolbarActions>
</Toolbar>
<div class="box is-fullwidth is-sideless is-paddingless is-marginless">
  <InfoTableRow @label="Name" @value={{this.model.name}} @alwaysRender={{true}} />
  <InfoTableRow @label="Issuer URL" @value={{this.model.issuer}} @addCopyButton={{true}} @alwaysRender={{true}} />
  <InfoTableRow
    @label="Scopes"
    @type="array"
    @value={{@model.scopesSupported}}
    @model={{@model}}
    @isLink={{true}}
    @modelType="oidc/scope"
    @itemRoute={{"vault.cluster.access.oidc.scopes.scope.details"}}
    @alwaysRender={{true}}
    @doNotTruncate={{true}}
  />
</div>