<?php
/**
 * The template for displaying content archive room.
 *
 * This template can be overridden by copying it to yourtheme/wp-hotel-booking/content-room.php.
 *
 * @author  ThimPress, leehld
 * @package WP-Hotel-Booking/Templates
 * @version 1.6.1
 */

/**
 * Prevent loading this file directly
 */
defined('ABSPATH') || exit();

global $post;

$adults = get_post_meta(get_the_ID(), '_hb_room_capacity_adult', true);
$children = get_post_meta(get_the_ID(), '_hb_max_child_per_room', true);
$beds   = get_post_meta(get_the_ID(), '_hb_room_beds', true);
$size   = get_post_meta(get_the_ID(), '_hb_room_area', true);
$capacity = $adults + $children;
?>
<li id="room-<?php the_ID(); ?>" <?php post_class(); ?>>

    <?php
    /**
     * hotel_booking_before_loop_room_item hook
     */
    do_action('hotel_booking_before_loop_room_item');
    ?>

    <div class="summary entry-summary">

        <?php
        /**
         * hotel_booking_loop_room_thumbnail hook
         */
        do_action('hotel_booking_loop_room_thumbnail');
        
        /**
         * hotel_booking_loop_room_title hook
         */
        do_action('hotel_booking_loop_room_title');
        
        echo '<div class="room-rating-featured">';
        /**
         * hotel_booking_loop_room_rating hook
         */
        do_action('hotel_booking_loop_room_rating');

        /**
         * hotel_booking_loop_room_feature hook
         */
        do_action('hotel_booking_loop_room_feature');
        echo '</div>';
        
        echo '<div class="hotel-room-details">';
        echo '<div class="room-feat hotel-room-bed"><i class="fa fa-bed"></i> <span class="detail room-bed"> Beds : </span>'.$beds.'</div>';
        echo '<div class="room-feat hotel-room-capacity"><i class="fa fa-users"></i> <span class="detail room-capacity"> Capacity : </span>'.$capacity.' Persons</div>';
        echo '<div class="room-feat hotel-room-adults"><i class="fa fa-user"></i> <span class="detail room-adult"> Adults : </span>'.$adults.'</div>';
        echo '<div class="room-feat hotel-room-children"><i class="fa fa-child"></i>  <span class="detail room-children"> Children : </span>'.$children.'</div>';
        echo '<div class="room-feat hotel-room-size"><i class="fa fa-expand-alt"></i> <span class="detail room-size"> Room Area : </span>'.$size.'</div>';
        echo '</div>';
        

        /**
         * hotel_booking_loop_room_price hook
         */
        do_action('hotel_booking_loop_room_price');
        ?>

    </div><!-- .summary -->

    <?php
    /**
     * hotel_booking_after_loop_room_item hook
     */
    do_action('hotel_booking_after_loop_room_item');
    ?>

</li>

<?php
/**
 * hotel_booking_after_loop_room
 */
do_action('hotel_booking_after_loop_room'); ?>
