<?php
/** 
 * @package     VikRestaurants
 * @subpackage  core
 * @author      E4J s.r.l.
 * @copyright   Copyright (C) 2023 E4J s.r.l. All Rights Reserved.
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 * @link        https://vikwp.com
 */

// No direct access
defined('ABSPATH') or die('No script kiddies please!');

/**
 * Layout variables
 * -----------------
 * @var  object[]  $attributes  A list of supported attributes
 */
extract($displayData);

if (empty($attributes))
{
    return;
}

?>

<div class="vrtk-attributes-legend">
    <?php foreach ($attributes as $attr): ?>
        <div class="vrtk-attribute-box">
            <?php echo JHtml::fetch('vrehtml.foodattributes.display', $attr); ?>
            
            <span
                <?php echo !empty($attr->description) ? 'title="' . $this->escape(strip_tags($attr->description)) . '"' : ''; ?>
            ><?php echo $attr->name; ?></span>
        </div>
    <?php endforeach; ?>
</div>
