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

        <hr />

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

        <jhi-alert></jhi-alert>

        <dl class="row-md jh-entity-details">
          <dt><span jhiTranslate="resilientApp.contentPage.title">Title</span></dt>
          <dd>
            <span>{{ contentPage()!.title }}</span>
          </dd>
          <dt><span jhiTranslate="resilientApp.contentPage.slug">Slug</span></dt>
          <dd>
            <span [jhiTranslate]="'resilientApp.ContentPageType.' + (contentPage()!.slug ?? 'null')">{{
              { null: '', HOME_ANONYMOUS: 'Home Anonymous', HOME_AUTHENTICATED: 'Home Authenticated' }[contentPage()!.slug ?? 'null']
            }}</span>
          </dd>
          <dt><span jhiTranslate="resilientApp.contentPage.content">Content</span></dt>
          <dd>
            <span>{{ contentPage()!.content }}</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]="['/content-page', contentPage()!.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>
