<div class="d-flex justify-content-center">
  <div class="col-8">
    @if (unit()) {
      <div>
        <h2 data-cy="unitDetailsHeading"><span jhiTranslate="resilientApp.unit.detail.title">Unit</span></h2>

        <hr />

        <jhi-alert-error></jhi-alert-error>

        <jhi-alert></jhi-alert>

        <dl class="row-md jh-entity-details">
          <dt><span jhiTranslate="global.field.id">Código</span></dt>
          <dd>
            <span>{{ unit()!.id }}</span>
          </dd>
          <dt><span [ngbTooltip]="'resilientApp.unit.help.code' | translate" jhiTranslate="resilientApp.unit.code">Code</span></dt>
          <dd>
            <span>{{ unit()!.code }}</span>
          </dd>
          <dt><span [ngbTooltip]="'resilientApp.unit.help.symbol' | translate" jhiTranslate="resilientApp.unit.symbol">Symbol</span></dt>
          <dd>
            <span>{{ unit()!.symbol }}</span>
          </dd>
          <dt><span [ngbTooltip]="'resilientApp.unit.help.name' | translate" jhiTranslate="resilientApp.unit.name">Name</span></dt>
          <dd>
            <span>{{ unit()!.name }}</span>
          </dd>
          <dt><span jhiTranslate="resilientApp.unit.description">Description</span></dt>
          <dd>
            <span>{{ unit()!.description }}</span>
          </dd>
          <dt>
            <span [ngbTooltip]="'resilientApp.unit.help.convertionRate' | translate" jhiTranslate="resilientApp.unit.convertionRate"
              >Convertion Rate</span
            >
          </dt>
          <dd>
            <span>{{ unit()!.convertionRate }}</span>
          </dd>
          <dt><span [ngbTooltip]="'resilientApp.unit.help.version' | translate" jhiTranslate="resilientApp.unit.version">Version</span></dt>
          <dd>
            <span>{{ unit()!.version }}</span>
          </dd>
          <dt><span jhiTranslate="resilientApp.unit.unitType">Unit Type</span></dt>
          <dd>
            @if (unit()!.unitType) {
              <div>
                <a [routerLink]="['/unit-type', unit()!.unitType?.id, 'view']">{{ unit()!.unitType?.name }}</a>
              </div>
            }
          </dd>
        </dl>

        <button type="submit" (click)="previousState()" class="btn btn-info" data-cy="entityDetailsBackButton">
          <fa-icon icon="arrow-left"></fa-icon>&nbsp;<span jhiTranslate="entity.action.back">Voltar</span>
        </button>

        <button type="button" [routerLink]="['/unit', unit()!.id, 'edit']" class="btn btn-primary">
          <fa-icon icon="pencil-alt"></fa-icon>&nbsp;<span jhiTranslate="entity.action.edit">Editar</span>
        </button>
      </div>
    }
  </div>
</div>
