<?php
/**
 * Section Title View for Pixelio Cart Abandon Recovery More plugin.
 *
 * This file defines a reusable class for rendering section titles
 * in the admin pages of the Pixelio Cart Abandon Recovery More plugin.
 *
 * PHP version 8.0+
 *
 * @package PixelioCartAbandonRecoveryMore
 */

namespace PixelioCartAbandonRecoveryMore\Admin\Views\Reusable;

use PixelioCartAbandonRecoveryMore\Includes\Utils\Pixelio_Cart_Abandon_Recovery_More_Util;

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

/**
 * Class Pixelio_Cart_Abandon_Recovery_More_Section_Title
 *
 * Reusable class for displaying a section title in admin pages.
 *
 * @package PixelioCartAbandonRecoveryMore\Admin\Views\Reusable
 */
class Pixelio_Cart_Abandon_Recovery_More_Section_Title {

	/**
	 * The text label of the section title.
	 *
	 * @var string
	 */
	private $label;

	/**
	 * Constructor.
	 *
	 * Initializes the section title with the provided label.
	 *
	 * @param string $label The title text to display.
	 */
	public function __construct( $label ) {
		$this->label = $label;
	}

	/**
	 * Outputs the HTML for the section title.
	 *
	 * Escapes the label for safe output in the admin area.
	 *
	 * @return void
	 */
	public function pixelio_cart_abandon_recovery_more_get_views(): void {
		?>
		<h1 class="pixelio-cart-abandon-recovery-more-page-section-title "><?php echo esc_attr( $this->label ); ?></h1>
		<?php
	}
}
