<?php
/**
 * Admin page rendering the full update log table (F1).
 * WP_List_Table is instantiated lazily inside render(), never in __construct().
 *
 * @package ConflictRadar\Admin
 */

declare( strict_types=1 );

namespace ConflictRadar\Admin;

if ( ! defined( 'ABSPATH' ) ) { exit; }

class UpdateHistoryPage {

	public function render(): void {
		if ( ! current_user_can( 'manage_options' ) ) {
			wp_die( esc_html__( 'Unauthorized', 'conflict-radar' ) );
		}

		$table = new UpdateHistoryTable(); // Lazy: here, not in the constructor.
		$table->prepare_items();

		require CONFLICT_RADAR_DIR . 'templates/admin/update-history.php';
	}
}
