<?php
defined('ABSPATH') || exit;

$iv1wpt_has_pro = iv1wpt_has_pro();

?>

<div class="card">
    <h2><span class="dashicons dashicons-list-view"></span>&nbsp;<?php esc_html_e('Activity Log', 'iv1-wp-tools'); ?></h2>

    <p><?php esc_html_e('Shows recent administrative and security-related events.', 'iv1-wp-tools'); ?></p>

    <p>
        <label for="iv1wpt-activity-limit">
            <?php esc_html_e('Entries', 'iv1-wp-tools'); ?>
        </label>

        <select id="iv1wpt-activity-limit" <?php disabled(!$iv1wpt_has_pro); ?>>
            <option value="25">25</option>
            <option value="50">50</option>
            <option value="100" selected>100</option>
            <option value="250">250</option>
            <option value="500">500</option>
        </select>

		<button type="button" class="button button-primary" id="iv1wpt-activity-load" <?php disabled(!$iv1wpt_has_pro); ?>>
			<?php echo !$iv1wpt_has_pro ? '🔒 ' : ''; ?>
			<?php esc_html_e('Load activity log', 'iv1-wp-tools'); ?>
		</button>

		<button type="button" class="button button-secondary" id="iv1wpt-activity-clear" <?php disabled(!$iv1wpt_has_pro); ?>>
			<?php echo !$iv1wpt_has_pro ? '🔒 ' : ''; ?>
			<?php esc_html_e('Clear activity log', 'iv1-wp-tools'); ?>
		</button>
		
    </p>

    <div id="iv1wpt-activity-result"></div>
</div>