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

        <hr />

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

        <jhi-alert></jhi-alert>

        <dl class="row-md jh-entity-details">
          <dt><span jhiTranslate="resilientApp.unitConverter.fromUnit">From Unit</span></dt>
          <dd>
            @if (unitConverter()!.fromUnit) {
              <div>
                <a [routerLink]="['/unit', unitConverter()!.fromUnit?.id, 'view']">{{ unitConverter()!.fromUnit?.unitType?.name }} » {{ unitConverter()!.fromUnit?.name }}</a>
              </div>
            }
          </dd>
          <dt><span jhiTranslate="resilientApp.unitConverter.toUnit">To Unit</span></dt>
          <dd>
            @if (unitConverter()!.toUnit) {
              <div>
                <a [routerLink]="['/unit', unitConverter()!.toUnit?.id, 'view']">{{ unitConverter()!.fromUnit?.unitType?.name }} » {{ unitConverter()!.toUnit?.name }}</a>
              </div>
            }
          </dd>
          <dt><span jhiTranslate="resilientApp.unitConverter.name">Name</span></dt>
          <dd>
            <span>{{ unitConverter()!.name }}</span>
          </dd>
          <dt><span jhiTranslate="resilientApp.unitConverter.description">Description</span></dt>
          <dd>
            <span>{{ unitConverter()!.description }}</span>
          </dd>
          <dt>
            <span
              [ngbTooltip]="'resilientApp.unitConverter.help.convertionFormula' | translate"
              jhiTranslate="resilientApp.unitConverter.convertionFormula"
              >Convertion Formula</span
            >
          </dt>
          <dd>
            <span>{{ unitConverter()!.convertionFormula }}</span>
          </dd>

<!-- HIDDEN Properties 
          <dt><span jhiTranslate="global.field.id">Código</span></dt>
          <dd>
            <span>{{ unitConverter()!.id }}</span>
          </dd>
          <dt>
            <span [ngbTooltip]="'resilientApp.unitConverter.help.version' | translate" jhiTranslate="resilientApp.unitConverter.version"
              >Version</span
            >
          </dt>
          <dd>
            <span>{{ unitConverter()!.version }}</span>
          </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-converter', unitConverter()!.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>
