<?php

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

add_filter(
	'deploy_sync_content__routes',
	static function ( array $routes = array() ): array {
		$handle_route_callback = static function () {
			require_once DEPLOY_SYNC_CONTENT__PLUGIN_DIR . '/admin/partials/deploy-sync-content-admin-updates.php';
		};

		$routes['updates'] = [
			'id'                    => 'updates',
			'label'                 => __( 'Updates', 'deploy-sync-content' ),
			'handle_route_callback' => $handle_route_callback,
			'has_tab'               => true,
			'weight'                => 100,
		];

		return $routes;
	},
	-10
);
