<commit_before><Route
  @name={{routeName}}
as |route|>
  <DataLoader
    @src={{uri '/${partition}/${nspace}/${dc}/intentions/for-service/${slug}'
      (hash
        partition=route.params.partition
        nspace=route.params.nspace
        dc=route.params.dc
        slug=route.params.name
      )
    }}
  as |api|>
    <BlockSlot @name="error">
      <ErrorState @error={{api.error}} />
    </BlockSlot>
    <BlockSlot @name="loaded">
  {{#let

    (hash
      value=(or sortBy "Action:asc")
      change=(action (mut sortBy) value="target.selected")
    )

    (hash
      access=(hash
        value=(if access (split access ',') undefined)
        change=(action (mut access) value="target.selectedItems")
      )
      searchproperty=(hash
        value=(if (not-eq searchproperty undefined)
          (split searchproperty ',')
          searchProperties
        )
        change=(action (mut searchproperty) value="target.selectedItems")
        default=searchProperties
      )
    )

    api.data

  as |sort filters items|}}
    <div class="tab-section">
  {{#if (can 'create intentions')}}
        <Portal @target="app-view-actions">
          <a data-test-create href={{href-to 'dc.services.show.intentions.create'}} class="type-create">Create</a>
        </Portal>
  {{/if}}
  {{#if (gt items.length 0) }}
        <Consul::Intention::SearchBar
          @search={{search}}
          @onsearch={{action (mut search) value="target.value"}}

          @sort={{sort}}

          @filter={{filters}}
        />
  {{/if}}
        <DataWriter
          @sink={{uri
            '/${partition}/${dc}/${nspace}/intention/'
            (hash
              partition=route.params.partition
              nspace=route.params.nspace
              dc=route.params.dc
            )
          }}
          @type="intention"
          @ondelete={{refresh-route}}
        as |writer|>
          <BlockSlot @name="content">
            <DataCollection
              @type="intention"
              @sort={{sort.value}}
              @filters={{filters}}
              @search={{search}}
              @items={{items}}
            as |collection|>
              <collection.Collection>
                <Consul::Intention::List
                  @items={{collection.items}}
                  @check={{search}}
                  @delete={{writer.delete}}
                as |list|>
                  <list.CustomResourceNotice />
                  <list.CheckNotice />
                  <list.Table @routeName="dc.services.show.intentions.edit" />
                </Consul::Intention::List>
              </collection.Collection>
              <collection.Empty>
                <EmptyState>
                  <BlockSlot @name="body">
                    <p>
                        There are no intentions {{if (gt items.length 0) 'found '}} for this service.
                    </p>
                  </BlockSlot><commit_msg>ui: consistent empty state for intentions (#11261)<commit_after><Route
  @name={{routeName}}
as |route|>
  <DataLoader
    @src={{uri '/${partition}/${nspace}/${dc}/intentions/for-service/${slug}'
      (hash
        partition=route.params.partition
        nspace=route.params.nspace
        dc=route.params.dc
        slug=route.params.name
      )
    }}
  as |api|>
    <BlockSlot @name="error">
      <ErrorState @error={{api.error}} />
    </BlockSlot>
    <BlockSlot @name="loaded">
  {{#let

    (hash
      value=(or sortBy "Action:asc")
      change=(action (mut sortBy) value="target.selected")
    )

    (hash
      access=(hash
        value=(if access (split access ',') undefined)
        change=(action (mut access) value="target.selectedItems")
      )
      searchproperty=(hash
        value=(if (not-eq searchproperty undefined)
          (split searchproperty ',')
          searchProperties
        )
        change=(action (mut searchproperty) value="target.selectedItems")
        default=searchProperties
      )
    )

    api.data

  as |sort filters items|}}
    <div class="tab-section">
  {{#if (can 'create intentions')}}
        <Portal @target="app-view-actions">
          <a data-test-create href={{href-to 'dc.services.show.intentions.create'}} class="type-create">Create</a>
        </Portal>
  {{/if}}
  {{#if (gt items.length 0) }}
        <Consul::Intention::SearchBar
          @search={{search}}
          @onsearch={{action (mut search) value="target.value"}}

          @sort={{sort}}

          @filter={{filters}}
        />
  {{/if}}
        <DataWriter
          @sink={{uri
            '/${partition}/${dc}/${nspace}/intention/'
            (hash
              partition=route.params.partition
              nspace=route.params.nspace
              dc=route.params.dc
            )
          }}
          @type="intention"
          @ondelete={{refresh-route}}
        as |writer|>
          <BlockSlot @name="content">
            <DataCollection
              @type="intention"
              @sort={{sort.value}}
              @filters={{filters}}
              @search={{search}}
              @items={{items}}
            as |collection|>
              <collection.Collection>
                <Consul::Intention::List
                  @items={{collection.items}}
                  @check={{search}}
                  @delete={{writer.delete}}
                as |list|>
                  <list.CustomResourceNotice />
                  <list.CheckNotice />
                  <list.Table @routeName="dc.services.show.intentions.edit" />
                </Consul::Intention::List>
              </collection.Collection>
              <collection.Empty>
                <EmptyState>
                  <BlockSlot @name="header">
                    <h2>
                      {{#if (gt items.length 0)}}
                        No intentions found
                      {{else}}
                        Welcome to Intentions
                      {{/if}}
                    </h2>
                  </BlockSlot>
                  <BlockSlot @name="body">
                    <p>
                      {{#if (gt items.length 0)}}
                        No intentions where found matching that search, or you may not have access to view the intentions you are searching for.
                      {{else}}
                        There don't seem to be any intentions, or you may not have access to view intentions yet.
                      {{/if}}
                    </p>
                  </BlockSlot>
                  <BlockSlot @name="actions">
                    <li class="docs-link">
                      <a href="{{env 'CONSUL_DOCS_URL'}}/commands/intention" rel="noopener noreferrer" target="_blank">Documentation on intentions</a>
                    </li>
                    <li class="learn-link">
                      <a href="{{env 'CONSUL_DOCS_LEARN_URL'}}/consul/getting-started/connect" rel="noopener noreferrer" target="_blank">Read the guide</a>
                    </li>
                  </BlockSlot>
{'fraction_non_alphanumeric': 0.1417142857142857, 'fraction_numerical': 0.0017142857142857142, 'mean_word_length': 1.5786372007366483, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5398051', 'n_tokens_mistral': 1909, 'n_tokens_neox': 1851, 'n_words': 359}