<?php
namespace PixelioCartAbandonRecoveryMore\Admin\Services;
if (!defined('ABSPATH')) exit;
class Pixelio_Cart_Abandon_Recovery_More_Link_Builder_Service
{
	private mixed $pixelio_wordpress_wrapper;

	public function __construct($wordpress_wrapper)
	{
		$this->pixelio_wordpress_wrapper = $wordpress_wrapper;
	}

	public function build_plugin_link(string $url, string $label, bool $blank = false): string
	{
		return sprintf(
			'<a href="%s"%s>%s</a>',
			$url,
			$blank ? ' target="_blank"' : '',
			$this->pixelio_wordpress_wrapper->pixelio_esc_html($label, 'rivio-ai-cart-recovery-marketing-email-automation')
		);
	}
}
