<?php
/**
 * Button to send to prod a single deployment item.
 *
 * @package EaLab\WP_Deployer
 */

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

/**
 * Button to send to prod a single deployment item.
 *
 * @param string $item_full_uuid The full UUID of the deployment item.
 * @param array  $context The build context.
 *
 * @return string Markup.
 */
function deploy_sync_content__deployment_item__single_send_to_prod_button( string $item_full_uuid, array $context ): string {
	// TODO: To implement, or to remove.
	return '';

	$button_label = esc_html__( 'Send to prod', 'deploy-sync-content' );

	$link_to_merge = add_query_arg(
		array(
			// When the deployment bundle is not set, the current site will send the item as currently set
			// in the database.
			'deployment_bundle' => $context['bundle_id'] ?? null,
			'tab'               => 'send-to-prod-unique',
			'uuid'              => rawurlencode( $item_full_uuid ),
		),
		admin_url( DEPLOY_SYNC_CONTENT__BASIC_URI )
	);

	return '<a href="' . esc_attr( $link_to_merge ) . '" class="btn btn-primary">' . $button_label . '</a>';
}
