<?php

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

use EaLab\WP_Deployer\includes\controller\Merge_Form_Handler;

add_filter(
	'deploy_sync_content__routes',
	static function ( array $routes = array() ): array {
		$handle_route_callback = static function () {
			$_merge_handler = new Merge_Form_Handler();
			$_merge_handler->deploy_sync_content__routing_handler_merge();
		};

		$routes['diff'] = [
			'id'                    => 'diff',
			'label'                 => __( 'Diff', 'deploy-sync-content' ),
			'handle_route_callback' => $handle_route_callback,
		];

		$routes['merge'] = [
			'id'                    => 'merge',
			'label'                 => __( 'Merge', 'deploy-sync-content' ),
			'handle_route_callback' => $handle_route_callback,
		];

		return $routes;
	},
	-10
);
