<?php require 'inc/html.php'; ?>
<head>
  <?php require 'inc/head.php'; ?>
</head>
<body>
<div class="wrapper">
  <div class="row-fluid">
    <h1>CASINOS BARRIERE</h1>
  </div>
  <div class="row-fluid">
    <?= generateAllBlocksTitle('SMART-MODAL', 'Component') ?>
  </div>
  <?php if (!isset($_GET['devices'])): ?>
    <h2 style="text-align: center; margin: 30px 0;">Choisissez un cas de test</h2>
    <div class="row-fluid" style="text-align: center; max-width: 800px; margin-bottom: 100px;">
      <a class="button-golden" href="test-component-SMART-MODAL.php?devices=desktop,tablet,mobile">Tous les devices</a>
      <a class="button-golden" href="test-component-SMART-MODAL.php?devices=desktop">Desktop</a>
      <a class="button-golden" href="test-component-SMART-MODAL.php?devices=tablet">Tablet</a>
      <a class="button-golden" href="test-component-SMART-MODAL.php?devices=mobile">Mobile</a>
    </div>
  <?php else: ?>
    <?php require 'inc/components/component-SMART-MODAL.php'; ?>
    <div class="row-fluid" style="text-align: center; max-width: 800px; margin-bottom: 100px;">
      <a class="button-golden" href="test-component-SMART-MODAL.php">Retour</a>
    </div>
  <?php endif ?>
  <h2 style="text-align: center; margin: 30px 0;">Commandes</h2>
  <div class="row-fluid" style="text-align: center; max-width: 800px; margin-bottom: 100px;">
    <button class="button-golden js-clear-localstorage" type="button">Effacer le local storage</button>
  </div>
</div>
<script>
  document.querySelector('.js-clear-localstorage').addEventListener('click', function() {

    window.localStorage.clear();
    console.info('localStorage cleared');
    alert('Local Storage Effacé !');
  });
</script>
<?php
require 'inc/debug.inc.php';
require 'inc/scripts.php';
?>
</body>
</html>
