<div class="info-section">
  <div>
    <span data-translate>Status</span>
    <span data-ng-if="tls_config.enabled">
      <span class="badge badge-primary">
        <span data-translate>Enabled</span>
      </span>
    </span>

    <span data-ng-if="!tls_config.enabled" class="badge badge-danger">
      <span data-translate>Disabled</span>
    </span>
  </div>

  <div class="hostname">
    <div data-ng-if="tls_config.enabled">
      <span>URL</span><span>:</span>
      <a href="https://{{resources.network.hostname}}" rel="noreferrer" target="_blank">https://{{resources.network.hostname}}</a>
    </div>
  </div>
</div>

<div data-translate>Certificate</div>
<div>
  <p><span data-translate>Issuer:</span> {{tls_config.files.cert.issuer}}</p>
  <p><span data-translate>Valid until:</span> {{tls_config.files.cert.expiration_date | date:'dd-MM-yyyy HH:mm'}}</p>
  <p data-ng-if="tls_config.acme">
    <span data-translate>Auto-renewal</span>: <span data-translate>Enabled</span>
  </p>
</div>

<hr />
<button data-ng-if="!tls_config.enabled" class="btn btn-primary" data-ng-click="toggleCfg()" data-translate>Enable</button>
<button data-ng-if="tls_config.enabled" class="btn btn-danger" data-ng-click="toggleCfg()" data-translate>Disable</button>
<button class="btn btn-danger" data-ng-click="resetCfg()" data-translate>Reset</button>
