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

<Route
  @name={{routeName}}
as |route|>
  <DataLoader @src={{
      uri '/${partition}/${nspace}/${dc}/discovery-chain/${name}'
      (hash
        partition=route.params.partition
        nspace=route.params.nspace
        dc=route.params.dc
        name=route.params.name
      )
  }} as |loader|>

    <BlockSlot @name="error">
      <AppError
        @error={{loader.error}}
        @login={{route.model.app.login.open}}
      />
    </BlockSlot>

    <BlockSlot @name="loaded">
      <div class="tab-section">
        <Consul::DiscoveryChain
          @chain={{loader.data.Chain}}
        />
      </div>
    </BlockSlot>
  </DataLoader>
</Route>
