<div layoutDirection="row" layoutAlign="default center" class="fl-margin-top-medium">
  <h3 class="fl-detail" i18n>DirectAdmin license</h3>
  <mat-icon class="link-icon" (click)="refreshLicense()" [attr.fl-tooltip]="refreshLicenseTooltip">refresh</mat-icon>
</div>
<ng-container *ngIf="data && data.service_resources; else noResources">
  <div layoutDirection="row" layoutAlign="default center">
    <p class="fl-detail" i18n>IP address: {{serviceResources.ip_address | nullValue}}</p>
    <mat-icon class="link-icon" (click)="changeIP()" [attr.fl-tooltip]="changeIPTooltip">edit</mat-icon>
  </div>
  <p class="fl-detail" i18n>License key: {{serviceResources.license_key | nullValue}}</p>
  <p class="fl-detail" i18n>License ID: <a *ngIf="serviceResources.lid; else noLid" class="active-link" target="_blank"
                                           rel="noreferrer"
                                           href="https://www.directadmin.com/clients/license.php?lid={{serviceResources.lid}}">{{serviceResources.lid}}</a>
    <ng-template #noLid>n/a</ng-template>
  </p>
  <p class="fl-detail" i18n>Active: {{serviceResources.active | yesNo}}</p>
  <p class="fl-detail" i18n>Verified: {{serviceResources.verified | yesNo}}</p>
  <p class="fl-detail" i18n>Suspended: {{serviceResources.suspended | yesNo}}</p>
  <div layoutDirection="row" layoutAlign="default center">
    <p class="fl-detail" i18n>Operating system: {{serviceResources.os_display | nullValue}}</p>
    <mat-icon class="link-icon" (click)="changeOS()" [attr.fl-tooltip]="changeOSTooltip">edit</mat-icon>
  </div>
  <div layoutDirection="row" layoutAlign="default center">
    <p class="fl-detail" i18n>Name: {{serviceResources.name | nullValue}}</p>
    <mat-icon class="link-icon" (click)="changeName()" [attr.fl-tooltip]="changeNameTooltip">edit</mat-icon>
  </div>
  <p *ngIf="serviceResources.expiry" class="fl-detail"
     i18n>Expiry date: <app-date-displayer [date]="serviceResources.expiry"></app-date-displayer></p>
</ng-container>
<ng-template #noResources>
  <p class="fl-detail" i18n>No DirectAdmin license data available.</p>
</ng-template>
