<?php
/**
 * @package com_spbooking
 * @author JoomShaper http://www.joomshaper.com
 * @copyright Copyright (c) 2010 - 2023 JoomShaper
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
 */

// No Direct Access
defined('_JEXEC') or die('Resticted Aceess');

use Joomla\CMS\Layout\LayoutHelper;

$accomodations  = $displayData['accomodations'];
$columns        = $displayData['columns'];

?>

<?php if (!empty($accomodations))
{
	?>
	<?php foreach (array_chunk($accomodations, $columns) as $hotels)
	{
		?>
		<div class="spbooking-row mt-10">
			<?php foreach ($hotels as $hotel)
			{
				?>
				<div class="spbooking col-lg-<?php echo floor(12 / $columns);?>">
					<?php echo LayoutHelper::render('accomodations.grid.item', array('accomodation' => $hotel)); ?>
				</div>
			<?php } ?>
		</div>
	<?php } ?>
<?php }
