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

<Route @name={{routeName}} as |route|>
  {{#if (gt route.model.items.length 0)}}
    <Consul::Peer::Address::List @items={{route.model.items}} />
  {{else}}
    <EmptyState @login={{route.model.app.login.open}} data-test-addresses-empty>
      <BlockSlot @name="header">
        <h2>
          {{t "routes.dc.peers.show.addresses.empty.header"}}
        </h2>
      </BlockSlot>
      <BlockSlot @name="body">
        {{t "routes.dc.peers.show.addresses.empty.body" htmlSafe=true}}
      </BlockSlot>
      <BlockSlot @name="actions">
        <li>
          <Hds::Link::Standalone
            @text='Documentation on Peers'
            @href="{{env
              'CONSUL_DOCS_URL'
            }}/connect/cluster-peering"
            @icon='docs-link'
            @iconPosition='trailing'
            @size='small'
          />
        </li>
        <li>
          <Hds::Link::Standalone
            @text='Take the tutorial'
            @href="{{env
              'CONSUL_DOCS_URL'
            }}/connect/cluster-peering/create-manage-peering"
            @icon='learn-link'
            @iconPosition='trailing'
            @size='small'
          />
        </li>
      </BlockSlot>
    </EmptyState>
  {{/if}}
</Route>