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

{{#if this.loading}}
  <LayoutLoading />
{{else}}
  <MessageError @errors={{this.errors}} />
  <div class="replication-actions-grid-layout">
    {{#each
      (replication-action-for-mode this.replicationMode this.model.replicationAttrs.modeForUrl)
      as |replicationAction|
    }}
      <div class="replication-actions-grid-item">
        <Hds::Card::Container class="action-block-width" @hasBorder={{true}}>
          {{component
            (concat "replication-action-" replicationAction)
            onSubmit=(action "onSubmit")
            replicationMode=this.replicationMode
            model=this.model
          }}
        </Hds::Card::Container>
      </div>
    {{/each}}
  </div>
{{/if}}