<?php /** AURA FARMING — Footer */ ?>
<?php
$hideLegalFooter = $hideLegalFooter ?? false;
$currentBodyClass = (string)($bodyClass ?? '');
$renderLegalFooter = !$hideLegalFooter
  && !str_contains($currentBodyClass, 'admin-body')
  && !str_contains($currentBodyClass, 'gameplay-body')
  && !str_contains($currentBodyClass, 'spectator-body');
?>
<?php if ($renderLegalFooter): ?>
<footer class="global-legal-footer" aria-label="Documentos e privacidade">
  <a href="<?= SITE_URL ?>/pages/termos-de-uso.php">Termos</a>
  <a href="<?= SITE_URL ?>/pages/privacidade.php">Privacidade</a>
  <a href="<?= SITE_URL ?>/pages/privacidade-menores.php">Menores</a>
  <a href="<?= SITE_URL ?>/pages/cookies.php">Cookies</a>
  <?php if (function_exists('isLoggedIn') && isLoggedIn()): ?><a href="<?= SITE_URL ?>/pages/central-privacidade.php">Meus dados</a><?php endif; ?>
</footer>
<?php endif; ?>

<!-- JS global -->
<script src="<?= SITE_URL ?>/assets/js/app.js?v=11.1"></script>
<?php foreach (($pageScripts ?? []) as $script): ?>
<script src="<?= esc($script) ?>"></script>
<?php endforeach; ?>
<?php foreach (($pageModuleScripts ?? []) as $script): ?>
<script type="module" src="<?= esc($script) ?>"></script>
<?php endforeach; ?>
</body>
</html>
