extends layout

block content
  .container.mt-5
    .row
      .col-md-8.offset-md-2
        .card
          .card-body
            h5.card-title= announcement.title
            p.card-text Type de Bien: #{announcement.propertyType}
            p.card-text Prix: #{announcement.price}€
            p.card-text Description: #{announcement.description}
            p.card-text Statut Publication: #{announcement.publicationStatus}
            p.card-text Statut Bien: #{announcement.propertyStatus}
            - var date = new Date(announcement.availabilityDate);
            - var options = { year: 'numeric', month: 'long', day: 'numeric' };
            - var frenchDate = date.toLocaleDateString('fr-FR', options);
            p.card-text Date de Disponibilité: #{frenchDate}

            if announcement.photos.length > 0
              each photo in announcement.photos
                img.card-img-top(src=`/uploads/${photo}`, alt=announcement.title)

            a.btn.btn-primary(href=`/announcements/update/${announcement._id}`) Modifier l'annonce
