<div class="changelog_container">
    <?php
    $rental_estate_realtor_changelog_entries = rental_estate_realtor_get_changelog_from_readme();
    if (!empty($rental_estate_realtor_changelog_entries)) :
        foreach ($rental_estate_realtor_changelog_entries as $rental_estate_realtor_entry) :
            $rental_estate_realtor_version = esc_html($rental_estate_realtor_entry[1]);
            $rental_estate_realtor_date = esc_html($rental_estate_realtor_entry[2]);
            $rental_estate_realtor_details = explode("\n", trim($rental_estate_realtor_entry[3]));
            ?>
            <div class="changelog_element">
                <span class="theme_version">
                    <strong><?php echo 'v' . $rental_estate_realtor_version; ?></strong>
                    <?php echo 'Release date: ' . $rental_estate_realtor_date; ?>
                    <span class="dashicons dashicons-arrow-down-alt2"></span>
                </span>

                <div class="changelog_details" style="display: none;">
                    <ul>
                        <?php foreach ($rental_estate_realtor_details as $rental_estate_realtor_detail) : ?>
                            <li><?php echo esc_html(trim($rental_estate_realtor_detail, "- \t")); ?></li>
                        <?php endforeach; ?>
                    </ul>
                </div>
            </div>
        <?php
        endforeach;
    else :
        ?>
        <p><?php esc_html_e('No changelog available.', 'rental-estate-realtor'); ?></p>
    <?php endif; ?>
</div>