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

{{#if @replicationDisabled}}
  <Page::Header @title={{this.title}}>
    <:breadcrumbs>
      <Page::Breadcrumbs
        @breadcrumbs={{array (hash label="Vault" route="vault" icon="vault" linkExternal=true) (hash label=this.title)}}
      />
    </:breadcrumbs>
    <:description>
      {{this.description}}
      <Hds::Link::Inline @isHrefExternal={{true}} @href={{doc-link this.docLink}}>
        Learn more
      </Hds::Link::Inline>
    </:description>
  </Page::Header>

  <EnableReplicationForm
    @replicationMode={{@replicationMode}}
    @canEnablePrimary={{this.canEnable "Primary"}}
    @canEnableSecondary={{this.canEnable "Secondary"}}
    @performanceReplicationDisabled={{@cluster.performance.replicationDisabled}}
    @performanceMode={{if @cluster.performance.replicationDisabled "disabled" @cluster.performance.modeForUrl}}
    @onSuccess={{@onEnableSuccess}}
  />
{{else}}
  <ReplicationSummary @cluster={{@cluster}} @initialReplicationMode={{@replicationMode}} />
{{/if}}