<?php
/**
 * File Path: includes/api/esp/class-mbs-esp-platform-registry.php
 *
 * ESP Platform Registry — Platform, URL, and Encrypted Key Constants
 *
 * Centralizes the three constant arrays previously held as class
 * constants on MBS_Tab_Email:
 *
 *   PLATFORMS      — ordered ESP dropdown list (slug => label).
 *   URL_PLATFORMS  — slugs that require an Account URL field.
 *   ENCRYPTED_KEYS — option keys AES-256-CBC encrypted in the DB
 *                    (used by the export exclusion list and import
 *                    sanitizer to skip decrypting credentials).
 *
 * Extracted from MBS_Tab_Email (REF-010, Session 136).
 *
 * @package    My_Book_Showroom
 * @subpackage Includes/Api/Esp
 * @since      1.1.0
 */

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

class MBS_ESP_Platform_Registry { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- mbs_/MBS_ prefix is correct; scanner not configured with plugin prefix

	/** Platform slugs that require an Account URL field. */
	public const URL_PLATFORMS = array( 'sendy', 'activecampaign' );

	/** Ordered platform list for the dropdown. */
	public const PLATFORMS = array(
		''             => 'None',
		'mailchimp'      => 'Mailchimp',
		'mailerlite'     => 'MailerLite',
		'convertkit'     => 'ConvertKit (Kit)',
		'brevo'          => 'Brevo',
		'sendy'          => 'Sendy',
		'activecampaign' => 'ActiveCampaign',
		'getresponse'    => 'GetResponse',
		'campaignmonitor' => 'Campaign Monitor',
		'moosend'        => 'Moosend',
		'flodesk'        => 'Flodesk',
		'authoremail'    => 'Author.Email',
	);

	/** Encrypted option keys for the 11 ESP credentials (export exclusion list). */
	public const ENCRYPTED_KEYS = array(
		'mbs_setting_email_mailchimp_api_key',
		'mbs_setting_email_mailerlite_api_key',
		'mbs_setting_email_convertkit_api_key',
		'mbs_setting_email_brevo_api_key',
		'mbs_setting_email_sendy_api_key',
		'mbs_setting_email_sendy_url',
		'mbs_setting_email_activecampaign_api_key',
		'mbs_setting_email_activecampaign_url',
		'mbs_setting_email_getresponse_api_key',
		'mbs_setting_email_campaignmonitor_api_key',
		'mbs_setting_email_moosend_api_key',
		'mbs_setting_email_flodesk_api_key',
		'mbs_setting_email_authoremail_api_key',
		// F-027: CAPTCHA provider key pairs -- encrypted.
		'mbs_setting_email_captcha_recaptcha_v3_site_key',
		'mbs_setting_email_captcha_recaptcha_v3_secret_key',
		'mbs_setting_email_captcha_hcaptcha_site_key',
		'mbs_setting_email_captcha_hcaptcha_secret_key',
		'mbs_setting_email_captcha_turnstile_site_key',
		'mbs_setting_email_captcha_turnstile_secret_key',
	);
}
