{{! Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0 }}
{{#let (concat 'top:' @position.y 'px;left:' @position.x 'px;') (if (eq @type 'deny') 'Add intention' 'View intention') as |style label|}} {{#if (not @disabled)}} {{#if (eq @type 'deny')}} <:header>

{{t "components.consul.topology-metrics.popover.deny.header"}}

<:body>

{{#if @item.Intention.HasExact}} {{t "components.consul.topology-metrics.popover.deny.body.isExact"}} {{else}} {{t "components.consul.topology-metrics.popover.deny.body.notExact"}} {{/if}}

<:actions as |Actions|>
{{else if (eq @type 'not-defined')}} <:header>

{{t "components.consul.topology-metrics.popover.not-defined.header"}}

<:body>

{{t "components.consul.topology-metrics.popover.not-defined.body" downstream=@item.Name upstream=@service.Name }}

<:actions as |Actions|> {{t "components.consul.topology-metrics.popover.not-defined.action"}}
{{else}} <:header>

{{t "components.consul.topology-metrics.popover.l7.header"}}

<:body>

{{t "components.consul.topology-metrics.popover.l7.body"}}

<:actions as |Actions|> {{t "components.consul.topology-metrics.popover.l7.action"}}
{{/if}} {{! TODO: Once we can conditionally add a modifier these two buttons }} {{! should be replaced with a conditional modifer instead }} {{else}} {{/if}} {{/let}}