<?php
/**
 * AbstractFormHandler for SpectatorViews module.
 *
 * Provides base configuration for all SpectatorViews form handlers,
 * including nonce and action used for data validation and processing.
 *
 * @package Ilabs\Firevert\Modules\SpectatorViews\Services\Form
 */

declare( strict_types=1 );

namespace Ilabs\Firevert\Modules\SpectatorViews\Services\Form;

use Ilabs\Firevert\Core\Form\FormHandler;

/**
 * Class AbstractFormHandler
 *
 * Defines common properties for form handlers used in the SpectatorViews module.
 */
abstract class AbstractFormHandler extends FormHandler {

	/**
	 * The name of the nonce field used for form submission verification.
	 *
	 * This field must be included in the form and match the $action
	 * to ensure the data comes from a legitimate source.
	 *
	 * @var string
	 */
	protected string $nonce = 'firevert_spectator_views_nonce';

	/**
	 * The action name used to verify the submitted nonce.
	 *
	 * Must match the string used when creating the nonce via wp_create_nonce().
	 *
	 * @var string
	 */
	protected string $action = 'firevert_spectator_views_save';
}
