<?php

use Duplicator\Views\KsesHelper;

defined("ABSPATH") or die("");

/**
 * Aggregated tooltip body for the package flags cell.
 *
 * Variables
 *
 * @var \Duplicator\Core\Views\TplMng $tplMng
 * @var array<int, array{icon: string, label: string, details: string}> $tooltipGroups
 */

$tooltipGroups = $tplMng->getDataValueArrayRequired('tooltipGroups');

?>
<div class="dup-package-flags-tooltip">
    <?php foreach ($tooltipGroups as $group) { ?>
        <div class="dup-package-flags-tooltip-group">
            <div class="dup-package-flags-tooltip-head">
                <i class="<?php echo esc_attr($group['icon']); ?>"></i> <?php echo wp_kses($group['label'], KsesHelper::RICH_TAGS); ?>
            </div>
            <?php if (!empty($group['details'])) { ?>
                <?php echo wp_kses($group['details'], KsesHelper::RICH_TAGS); ?>
            <?php } ?>
        </div>
    <?php } ?>
</div>
