<?php /** @var \IAWP\Env $env */  ?>
<?php /** @var string $report_name */  ?>
<?php /** @var string $report_type */  ?>
<?php /** @var bool $can_edit_settings */  ?>
<?php /** @var bool $supports_saved_reports */  ?>
<?php /** @var bool $external */  ?>
<?php /** @var bool $upgrade */  ?>
<?php /** @var \IAWP\Report[] $reports */  ?>

<div class="menu-section <?php echo \htmlentities($report_type??'', ENT_QUOTES, 'UTF-8', false); ?> <?php echo \htmlentities($env->is_currently_viewed($report_type) ? 'current' : ''??'', ENT_QUOTES, 'UTF-8', false); ?> <?php echo \htmlentities($reports == null ? 'no-sub-items' : ''??'', ENT_QUOTES, 'UTF-8', false); ?> <?php echo \htmlentities($upgrade ? 'upgrade' : ''??'', ENT_QUOTES, 'UTF-8', false); ?> <?php echo \htmlentities($external ? 'external' : ''??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <span class="collapsed-icon" data-testid="collapsed-icon-<?php echo esc_attr($report_type); ?>">
 <?php
 echo iawp_blade()->run('icons.' . $report_type); ?>
 </span>
 <div class="report-inner">
 <h3 class="report-name <?php echo \htmlentities((!$upgrade && $env->is_favorite($report_type)) ? 'favorite' : ''??'', ENT_QUOTES, 'UTF-8', false); ?>"
 data-report-type="<?php echo \htmlentities($report_type??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <span class="icon-container">
 <span class="report-icon">
 <?php
 echo iawp_blade()->run('icons.' . $report_type); ?>
 </span>
 </span>
 <a href="<?php echo esc_attr($url) ?>"
 data-testid="menu-link-<?php echo esc_attr($report_type); ?>"
 >
 <?php echo \htmlentities($report_name??'', ENT_QUOTES, 'UTF-8', false); ?>

 </a>
 <?php if($upgrade): ?>
 <span class="pro-label">Pro</span>
 <?php endif; ?>
 <?php if($supports_saved_reports && $can_edit_settings): ?>
 <button class="add-new-report" data-controller="create-report"
 data-action="create-report#create"
 data-create-report-type-value="<?php echo esc_attr($report_type); ?>"
 data-testid="add-new-report-<?php echo esc_attr($report_type); ?>"><span
 class="dashicons dashicons-plus-alt2"></span></button>
 <?php endif; ?>
 </h3>
 <?php if($reports != null): ?>
 <ol data-controller="<?php echo \htmlentities($can_edit_settings ? "sortable-reports" : ""??'', ENT_QUOTES, 'UTF-8', false); ?>"
 data-sortable-reports-type-value="<?php echo esc_attr($report_type); ?>">
 <?php $__currentLoopData = $reports; $this->addLoop($__currentLoopData);$this->getFirstLoop();
 foreach($__currentLoopData as $report): $loop = $this->incrementLoopIndices();  ?>
 <li data-report-id="<?php echo \htmlentities($report->id()??'', ENT_QUOTES, 'UTF-8', false); ?>"
 class="<?php echo \htmlentities($report->is_current() ? 'current' : ''??'', ENT_QUOTES, 'UTF-8', false); ?> <?php echo \htmlentities($report->is_favorite() ? 'favorite' : ''??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <a href="<?php echo \htmlentities($report->url()??'', ENT_QUOTES, 'UTF-8', false); ?>"
 data-name-for-report-id="<?php echo \htmlentities($report->id()??'', ENT_QUOTES, 'UTF-8', false); ?>"
 data-testid="menu-link-<?php echo esc_attr(sanitize_title($report->name())); ?>"><?php echo \htmlentities($report->name()??'', ENT_QUOTES, 'UTF-8', false); ?></a>
 </li>
 <?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
 </ol>
 <?php endif; ?>
 </div>
 <a class="overlay-link" href="<?php echo esc_url($url); ?>" <?php
 echo $external ? 'target="_blank"' : '' ?>></a>
 <?php if($collapsed_label): ?>
 <span class="collapsed-label">
 <a href="<?php echo esc_url($url); ?>" <?php
 echo $external ? 'target="_blank"' : ''; ?>>
 <?php
 echo $collapsed_label; echo $external ? '<span class="dashicons dashicons-external"></span>' : ''; ?>
 </a>
 </span>
 <?php endif; ?>
</div>