{{#if (eq step 1)}}
  <form onsubmit={{action "clickNext"}}>
    <div class="row">
      <div class="col span-6">
        {{form-name-description
          model=model.cluster
          nameRequired=true
          nameLabel="clusterNew.name.label"
          namePlaceholder="clusterNew.name.placeholder"
          descriptionPlaceholder="clusterNew.description.placeholder"
        }}
      </div>
    </div>
  </form>
{{/if}}

{{#if (eq driverInfo.name "amazoneks")}}
  {{banner-message
    color="bg-warning"
    message=(t "clusterNew.amazoneks.ingressWarning")
  }}
{{else if (eq driverInfo.name "azureaks")}}
  {{banner-message
    color="bg-warning"
    message=(t "clusterNew.amazoneks.ingressWarning")
  }}
{{/if}}

{{#if (and driverInfo.nodePool (not isCustom))}}
  <section class="mb-40 mt-40">
    <CruNodePools
      @mode={{mode}}
      @cluster={{cluster}}
      @driver={{driverInfo.nodeWhich}}
      @nodeTemplates={{model.nodeTemplates}}
      @registerHook={{action "registerHook"}}
      @setNodePoolErrors={{action "setNodePoolErrors"}}
    />
  </section>
{{/if}}

{{#if (eq step 1)}}
  {{#accordion-list showExpandAll=false as |al expandFn|}}
    {{#accordion-list-item
       title=(t "clusterNew.members.label")
       detail=(t "clusterNew.members.detail")
       expandAll=al.expandAll
       everExpanded=true
       expanded=expanded
       expand=(action expandFn)
    }}
      {{#if model.cluster.internal}}
        <BannerMessage
          @icon="icon-alert"
          @color="bg-error mt-0 mb-10"
          @message={{t "clusterPage.internal" appName=settings.appName htmlSafe=true}}
        />
      {{/if}}

      {{#if isEdit}}
        <BannerMessage
          @icon="icon-info"
          @color="bg-info mt-0 mb-10"
          @message={{t "clusterPage.removeMemberNote"}}
        />
      {{/if}}

      <FormMembers
        @creator={{model.me}}
        @editing={{notView}}
        @expanded={{expanded}}
        @isNew={{newCluster}}
        @memberConfig={{memberConfig}}
        @errors={{memberErrors}}
        @primaryResource={{cluster}}
        @registerHook={{action "registerHook"}}
        @roles={{model.roleTemplates}}
        @type="cluster"
        @users={{model.users}}
      />
    {{/accordion-list-item}}
  {{/accordion-list}}
{{/if}}

{{#unless routeLoading}}
  {{component driverInfo.driverComponent
    applyClusterTemplate=applyClusterTemplate
    clusterTemplateQuestions=model.clusterTemplateRevision.questions
    clusterTemplateRevisionId=clusterTemplateRevisionId
    clusterErrors=errors
    mode=mode
    model=model
    nodePoolErrors=nodePoolErrors
    nodeWhich=driverInfo.nodeWhich
    originalCluster=originalCluster
    otherErrors=memberErrors
    save=(action "save")
    close=(action "close")
    registerHook=(action "registerHook")
    updateFromYaml=(action "updateFromYaml")
  }}
{{/unless}}

{{#if (and isEdit (not provider))}}
  {{top-errors errors=errors}}
  {{save-cancel
    editing=isEdit
    save=(action "save" )
    cancel=(action "close")
  }}
{{/if}}
