<template>
  <div class="d-flex justify-content-center">
    <div class="col-8">
      <div v-if="conferma">
        <h2 class="jh-entity-heading" data-cy="confermaDetailsHeading">
          <span>{{ t$('smartbookingApp.conferma.detail.title') }}Conferma</span> {{ conferma.id }}
        </h2>
        <dl class="row-md jh-entity-details">
          <dt>
            <span>{{ t$('smartbookingApp.conferma.motivoConferma') }}</span>
          </dt>
          <dd>
            <span>{{ conferma.motivoConferma }}</span>
          </dd>
          <dt>
            <span>{{ t$('smartbookingApp.conferma.tipoConferma') }}</span>
          </dt>
          <dd>
            <span>{{ t$('smartbookingApp.TipoConferma.' + conferma.tipoConferma) }}</span>
          </dd>
          <dt>
            <span>{{ t$('smartbookingApp.conferma.confermataDa') }}</span>
          </dt>
          <dd>
            <div v-if="conferma.confermataDa">
              <router-link :to="{ name: 'UtenteAppView', params: { utenteAppId: conferma.confermataDa.id } }">{{
                conferma.confermataDa.username
              }}</router-link>
            </div>
          </dd>
        </dl>
        <button type="submit" @click.prevent="previousState()" class="btn btn-info" data-cy="entityDetailsBackButton">
          <font-awesome-icon icon="arrow-left"></font-awesome-icon>&nbsp;<span>{{ t$('entity.action.back') }}</span>
        </button>
        <router-link v-if="conferma.id" :to="{ name: 'ConfermaEdit', params: { confermaId: conferma.id } }" custom v-slot="{ navigate }">
          <button @click="navigate" class="btn btn-primary">
            <font-awesome-icon icon="pencil-alt"></font-awesome-icon>&nbsp;<span>{{ t$('entity.action.edit') }}</span>
          </button>
        </router-link>
      </div>
    </div>
  </div>
</template>

<script lang="ts" src="./conferma-details.component.ts"></script>
