<?php
/**
 * Copyright 2022 Adobe
 * All Rights Reserved.
 *
 * NOTICE: Adobe permits you to use, modify, and distribute this file in
 * accordance with the terms of the Adobe license agreement accompanying
 * it.
 */

/**
 * @var \Sut\Domain\Compatibility\Data\FileResult $file
 */

?>
<div class="disclaimer-for-critical">
    <p class="alert alert-warning">
        <small>
            <?php if (count($file->getSummary()->getErrors())): ?>
                <span class="badge error-bg">
                    <i class="bi-shield-fill-x"></i> <?= count($file->getSummary()->getErrors()) ?>
                </span> error(s)
            <?php endif ?>
            <?php if (count($file->getSummary()->getErrors()) && count($file->getSummary()->getWarnings())): ?>
            and
            <?php endif ?>
            <?php if (count($file->getSummary()->getWarnings())): ?>
                <span class="badge warning-bg text-dark">
                    <i class="bi-shield-fill-exclamation"></i> <?= count($file->getSummary()->getWarnings()) ?>
                </span> warning(s)
            <?php endif ?>
            not listed since the minimum issue level is
            <span class="badge critical-bg"><i class="bi-shield-slash-fill"></i> [CRITICAL]</span> -
            Update the minimum issue level using the dropdown at the top right corner if you want to list them.
        </small>
    </p>
</div>

<div class="disclaimer-for-error">
    <?php if (count($file->getSummary()->getWarnings())): ?>
        <p class="alert alert-warning">
            <small>
            <span class="badge warning-bg text-dark">
                <i class="bi-shield-fill-exclamation"></i> <?= count($file->getSummary()->getWarnings()) ?>
            </span> warning(s)
            not listed since the minimum issue level is
            <span class="badge error-bg"><i class="bi-shield-fill-x"></i> [ERROR]</span> -
            Update the minimum issue level using the dropdown at the top right corner if you want to list them.
            </small>
        </p>
    <?php endif ?>
</div>
