<?php
$content = (new \App\Settings('content'))->getAll();
$footerLogo = json_decode($content['footer-logo'] ?? '{}', true);
$currentDomain = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'];
?>
<footer class="footer">
        <div class="container">

            <div class="footer__content">
                <div class="footer__logo">
                    <?php if (!empty($footerLogo['src'])): ?>
                        <a href="<?= $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] ?>">
                            <img src="<?= htmlspecialchars($footerLogo['src']) ?>" alt="<?= $footerLogo['alt'] ?? '' ?>" title="<?= $footerLogo['title'] ?? '' ?>">
                        </a>
                    <?php endif; ?>
                </div>
                <div class="footer__text">
                    <?= $content['footer__text'] ?? '' ?>
                </div>
            </div>

            <!-- footer menu -->
            <ul class="footer__menu">
                <li><a href="<?= $currentDomain . '/contacts' ?>"><?= $content['contact-menu-name'] ?? '' ?></a></li>
            </ul>

            <!-- footer partners -->
            <ul class="footer__bottom-imgs">
                <li><span><img data-src="images/18+.png" class="lazy" alt="18+" title="18+" width="40" height="40"></span></li>
                <li><a href="https://www.begambleaware.org/" rel="nofollow noopener" target="_blank"><img height="40" width="252" class="lazy" data-src="images/GA.png" alt="BeGambleAware" title="BeGambleAware"></a></li>
                <li><a href="https://itechlabs.com/" rel="nofollow noopener" target="_blank"><img height="40" width="40" class="lazy" data-src="images/itechlabs.png" alt="iTech Labs" title="iTech Labs"></a></li>
                <li><a href="https://www.mga.org.mt/" rel="nofollow noopener" target="_blank"><img height="40" width="92" class="lazy" data-src="images/mga.png" alt="MGA" title="MGA"></a></li>
                <li><img height="40" width="126" class="lazy" data-src="images/ecogra.png" alt="eCOGRA" title="eCOGRA"></li>
                <li><a href="https://gaminglabs.com/" rel="nofollow noopener" target="_blank"><img height="46" width="86" class="lazy" data-src="images/GLI.png" alt="GLI" title="GLI"></a></li>
            </ul>

            <!-- footer copyrights -->
            <div class="footer__copyright">
                <?= $content['copyright'] ?? '' ?>
            </div>

        </div>
    </footer>