<?php
// Copyright 1999-2025. WebPros International GmbH. All rights reserved.
?>
<div class="package-block<?php echo $this->hidden ? ' hide' : ''; ?>" id="changelog">
    <h4><span><?php echo $this->lmsg('smb.components.aps.package.changeLog'); ?></span></h4>
    <div id="changelog-content-area" class="package-block-area">
        <?php
        foreach ($this->changelog as $entry) {
            echo '<p>' . $this->escape($entry['version']) . ' (' . $this->escape($entry['release']) . ')' . '</p>';
            echo '<ul>';
            foreach ($entry['description'] as $descriptionEntry) {
                echo '<li>' . $this->escape($descriptionEntry) . '</li>';
            }
            echo '</ul>';
        }
        ?>
    </div>
</div>
<script type="text/javascript">
//<![CDATA[
(function () {
    document.getElementById('changelog').querySelectorAll('h4 span').forEach(function (element) {
        element.addEventListener('click', function () {
            document.getElementById('changelog').classList.toggle('hide');
        });
    });
})();
////]]>
</script>
