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

<Breadcrumb @crumb={{hash label="New" args=(array "administration.roles.new")}} />
{{page-title "Create Role"}}
<section class="section">
  <Hds::PageHeader as |PH|>
    <PH.Title data-test-title>Create Role</PH.Title>
  </Hds::PageHeader>
  {{#if this.model.policies.length}}
  <RoleEditor
    @role={{this.model.role}}
    @policies={{this.model.policies}}
  />
  {{else}}
    <div class="empty-message">
      <h3 class="empty-message-headline">
        No Policies
      </h3>
      <p class="empty-message-body">
        At least one Policy is required to create a Role; <LinkTo @route="administration.policies.new">create a new policy</LinkTo>
      </p>
    </div>
  {{/if}}
</section>
