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

<Hds::Breadcrumb data-test-breadcrumbs>
  {{#each @breadcrumbs as |breadcrumb|}}
    <Hds::Breadcrumb::Item
      data-test-breadcrumb={{breadcrumb.label}}
      @text={{breadcrumb.label}}
      @icon={{breadcrumb.icon}}
      @route={{breadcrumb.route}}
      @model={{breadcrumb.model}}
      @models={{breadcrumb.models}}
      @query={{breadcrumb.query}}
      @isRouteExternal={{breadcrumb.linkExternal}}
      {{! only generate a link for crumbs with a route, otherwise assume it's the current view }}
      @current={{not breadcrumb.route}}
    />
  {{/each}}
</Hds::Breadcrumb>