<?php
/**
 * Class Pixelio_Cart_Abandon_Recovery_More_Email_Templates
 *
 * This class handles the rendering of email templates for cart abandonment reminders.
 *
 * @package PixelioCartAbandonRecoveryMore
 * @subpackage Templates
 * @since 0.1
 */

namespace PixelioCartAbandonRecoveryMore\Includes\Templates;

	use PixelioCartAbandonRecoveryMore\Includes\Utils\Pixelio_Cart_Abandon_Recovery_More_Util;

	if ( ! defined( 'ABSPATH' ) ) exit;
	/**
	 * Class Pixelio_Cart_Abandon_Recovery_More_Email_Templates
	 *
	 * This class handles the rendering of email templates for cart abandonment reminders.
	 *
	 * @package PixelioCartAbandonRecoveryMore
	 * @subpackage Templates
	 * @since 0.1
	 */
class Pixelio_Cart_Abandon_Recovery_More_Email_Templates {

	/**
	 * List of products in the abandoned cart.
	 *
	 * @var array
	 */
	private $products;

	/**
	 * Constructor.
	 *
	 * Initializes the email template class with products to include in the email.
	 *
	 * @param array $products Array of products in the abandoned cart.
	 */
	public function __construct( $products ) {
		$this->products = $products;
	}

	/**
	 * Render the email reminder template and return as HTML string.
	 *
	 * This method includes the email reminder view and captures its output.
	 *
	 * @return string HTML content of the email reminder.
	 */
	public function pixelio_cart_abandon_recovery_more_get_views() {
		ob_start();
		include Pixelio_Cart_Abandon_Recovery_More_Util::$pixelio_plugin_dir_path . 'includes/templates/views/' . Pixelio_Cart_Abandon_Recovery_More_Util::$pixelio_plugin_slug . '-email-reminder.php';
		return ob_get_clean();
	}
}
