{{#if (eq policyType "acl")}}
({{uppercase model.format}} format)
{{/if}}
{{#if (and (not-eq model.id "root") (or capabilities.canUpdate capabilities.canDelete))}}
{{input
id="edit"
type="checkbox"
name="navToEdit"
class="switch is-rounded is-success is-small"
checked=false
change=(action (nav-to-route 'vault.cluster.policy.edit' model.id replace=true) )
data-test-policy-edit-toggle=true
}}
{{/if}}
{{ivy-codemirror
value=model.policy
options=(hash
readOnly=true
lineNumbers=true
tabSize=2
mode='ruby'
theme='hashi'
)
}}
{{#if model.paths}}
Paths
{{#each model.paths as |path|}}
-
{{path}}
{{/each}}
{{/if}}
{{download-button
classNames="link is-pulled-right"
actionText="Download policy"
extension=(if (eq policyType "acl") model.format "sentinel")
filename=model.name
data=model.policy
}}