{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
{{#if (or @model.isOIDC @model.isLDAP)}}
{{#each @model.options.state as |state|}}
{{t (concat 'states.' state)}}
{{/each}}
{{/if}}
{{#let
(hash
canCreateAccount=(can 'create model' @model collection='accounts')
canCreateManagedGroup=(can
'create model' @model collection='managed-groups'
)
canDelete=(can 'delete auth-method' @model)
)
as |perms|
}}
{{#if
(or perms.canCreateAccount perms.canCreateManagedGroup perms.canDelete)
}}
{{#if @model.isPrimary}}
{{t 'resources.auth-method.actions.remove-as-primary'}}
{{else}}
{{t 'resources.auth-method.actions.make-primary'}}
{{/if}}
{{#if perms.canCreateAccount}}
{{t 'resources.account.actions.create'}}
{{/if}}
{{#if perms.canCreateManagedGroup}}
{{#if (or @model.isOIDC @model.isLDAP)}}
{{t 'resources.managed-group.actions.create'}}
{{/if}}
{{/if}}
{{#if perms.canDelete}}
{{t 'resources.auth-method.actions.delete'}}
{{/if}}
{{/if}}
{{/let}}