<?php
/**
 * Constants Class
 *
 * This class defines all constant variables used throughout the plugin.
 * These constants include API endpoints, email addresses, status codes,
 * patterns, and configuration values.
 *
 * @package miniorange-sms-order-notification-otp-verification/helper
 * @since   1.0.0
 */

namespace WCSMSOTP\Helper;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Constants Class
 *
 * This class defines all constant variables used throughout the plugin.
 * These constants include API endpoints, email addresses, status codes,
 * patterns, and configuration values.
 */
if ( ! class_exists( 'MoConstants' ) ) {
	/**
	 * Constants Class
	 *
	 * This class defines all constant variables used throughout the plugin.
	 * These constants include API endpoints, email addresses, status codes,
	 * patterns, and configuration values.
	 */
	class MoConstants {

		/**
		 * API hostname.
		 *
		 * @var string
		 */
		const HOSTNAME = MOV_WC_HOST;

		/**
		 * Default customer key.
		 *
		 * @var string
		 */
		const DEFAULT_CUSTOMER_KEY = MOV_WC_DEFAULT_CUSTOMERKEY;

		/**
		 * Default API key.
		 *
		 * @var string
		 */
		const DEFAULT_API_KEY = MOV_WC_DEFAULT_APIKEY;

		/**
		 * From email address.
		 *
		 * @var string
		 */
		const FROM_EMAIL = 'no-reply@xecurify.com';

		/**
		 * Support email address.
		 *
		 * @var string
		 */
		const SUPPORT_EMAIL = 'info@xecurify.com';

		/**
		 * Feedback email address.
		 *
		 * @var string
		 */
		const FEEDBACK_EMAIL = 'otpsupport@xecurify.com';

		/**
		 * Success status code.
		 *
		 * @var string
		 */
		const SUCCESS = 'SUCCESS';

		/**
		 * Error status code.
		 *
		 * @var string
		 */
		const ERROR = 'ERROR';

		/**
		 * Failure status code.
		 *
		 * @var string
		 */
		const FAILURE = 'FAILURE';

		/**
		 * Area of interest for support queries.
		 *
		 * @var string
		 */
		const AREA_OF_INTEREST = 'WP OTP Verification Plugin';

		/**
		 * Query name for support.
		 *
		 * @var string
		 */
		const QUERY_NAME = 'WC OTP & Notifications';

		/**
		 * Plugin type.
		 *
		 * @var string
		 */
		const PLUGIN_TYPE = MOV_WC_TYPE;

		/**
		 * Phone number validation pattern.
		 *
		 * @var string
		 */
		const PATTERN_PHONE = '/^[\+]\d{1,4}\d{7,12}$|^[\+]\d{1,4}[\s]\d{7,12}$/';

		/**
		 * Country code validation pattern.
		 *
		 * @var string
		 */
		const PATTERN_COUNTRY_CODE = '/^[\+]\d{1,4}.*/';

		/**
		 * Pattern for spaces and hyphens.
		 *
		 * @var string
		 */
		const PATTERN_SPACES_HYPEN = '/([\(\) \-]+)/';

		/**
		 * Error JSON type.
		 *
		 * @var string
		 */
		const ERROR_JSON_TYPE = 'error';

		/**
		 * Success JSON type.
		 *
		 * @var string
		 */
		const SUCCESS_JSON_TYPE = 'success';

		/**
		 * Email transactions remaining (default value).
		 *
		 * @var int
		 */
		const EMAIL_TRANS_REMAINING = 10;

		/**
		 * Phone transactions remaining (default value).
		 *
		 * @var int
		 */
		const PHONE_TRANS_REMAINING = 10;

		/**
		 * FAQ URL.
		 *
		 * @var string
		 */
		const FAQ_URL = 'https://faq.miniorange.com/kb/otp-verification/';

		/**
		 * View transactions endpoint path.
		 *
		 * @var string
		 */
		const VIEW_TRANSACTIONS = '/moas/viewtransactions';

		/**
		 * FAQ payment URL.
		 *
		 * @var string
		 */
		const FAQ_PAY_URL = 'https://faq.miniorange.com/knowledgebase/how-to-make-payment-for-the-otp-verification-plugin';

		/**
		 * Default country.
		 *
		 * @var string
		 */
		const MOCOUNTRY = 'India';
	}
}
