<?php

if ($this->includeCss) {
    $GLOBALS['TL_CSS'][] = 'system/modules/cookiebar/assets/dist/cookiebar.min.css|all' . ($this->combineAssets ? '|static' : '');
}

if ($this->combineAssets) {
    $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/cookiebar/assets/dist/cookiebar.min.js|static';
}
?>

<!-- indexer::stop -->
<div class="cookiebar cookiebar--position-<?= $this->position ?>" role="complementary" aria-describedby="cookiebar-text" style="display:none;" data-cookiebar="<?= $this->cookie ?>"<?php if ($this->ttl): ?> data-cookiebar-ttl="<?= $this->ttl ?>"<?php endif; ?>>
<div class="container p-0">
          <span class="cookiebar__message"><?= $this->message ?></span><br><br>
    <div id="cookiebar-text" class="btn-group" aria-live="assertive" role="alert">
        <?php if ($this->more): ?>
          <a href="<?= $this->more['url'] ?>" class="cookiebar__link btn btn-info p-1" title="<?= specialchars($this->more['label']) ?>"><?= $this->more['label'] ?></a>
        <?php endif ?>
        <button class="cookiebar__button btn btn-success p-1" data-cookiebar-accept><?= $this->button ?></button>
    </div>

    <?php if ($this->analyticsCheckbox): ?>
        <div class="cookiebar__analytics">
            <label class="cookiebar__analytics-label">
                <input type="checkbox" class="cookiebar__analytics-checkbox" value="" data-cookiebar-analytics> <span class="cookiebar__analytics-text"><?= $this->analyticsCheckbox['label'] ?></span>
            </label>
        </div>
    <?php endif; ?>
</div>
</div>

<?php if (!$this->combineAssets): ?>
    <script src="system/modules/cookiebar/assets/dist/cookiebar.min.js" defer></script>
<?php endif; ?>
<!-- indexer::continue -->
