{{#if hasSslListeners}}
  <div class="row form-group">
    <div class="col-sm-12 col-md-2 form-label">
      <label class="form-control-static">Certificate*</label>
    </div>
    <div class="col-sm-12 col-md-8">
      {{new-select
        classNames="form-control"
        prompt="Choose a Certificate..."
        content=certificates
        optionLabelPath="displayDetailedName"
        optionValuePath="id"
        value=balancerService.defaultCertificateId
      }}
    </div>
  </div>

  <div class="row form-group">
    <div class="col-sm-12 col-md-2 form-label">
      <label class="form-control-static">Alternate Certs</label>
    </div>
    <div class="col-sm-12 col-md-8">
      <table class="table fixed no-lines no-top-padding tight small">
        <thead>
          <tr class="text-muted">
            <td>
              {{#if alternateCertificates.length}}
                <button class="btn-circle-plus btn-circle-text" style="margin: 10px 0;" {{action "addAlternate"}}>Add Alternate Certificate</button>
              {{else}}
                <div class="text-muted form-control-static">There are no other certificates to use.</div>
              {{/if}}
            </td>
            <th width="30">&nbsp;</th>
          </tr>
        </thead>
        <tbody>
          {{#each alternates as |alt|}}
            <tr>
              <td>
                {{new-select
                  classNames="form-control"
                  prompt="Choose a Certificate..."
                  content=alternateCertificates
                  optionLabelPath="displayDetailedName"
                  optionValuePath="id"
                  value=alt.value
                }}
              </td>
              <td class="text-right">
                {{#unless link.existing}}
                  <button {{action "removeAlternate" alt}} class="btn-circle-x" style="margin: 10px 0;" type="button" tabindex="-1"></button>
                {{/unless}}
              </td>
            </tr>
          {{/each}}
         </tbody>
      </table>
    </div>
  </div>

  <div class="row form-group">
    <div class="col-sm-12 col-md-offset-2 col-md-8">
      <p class="help-block">Note: Some older SSL/TLS clients do not support <a href="https://en.wikipedia.org/wiki/Server_Name_Indication" target="_blank">Server Name Indication (SNI)</a>; these clients will always be offered the main Certificate  Modern clients will be offered an appropriate certificate from the Alternate Certificates list if a match is found.</p>
    </div>
  </div>
{{else}}
  <div class="text-muted text-center">
    There are no SSL listening ports configured.
  </div>
{{/if}}
