<?php
/**
 * Controller for pricing tab.
 *
 * @package miniorange-sms-order-notification-otp-verification/controllers/
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}
use WCSMSOTP\Helper\MoConstants;
use WCSMSOTP\Helper\MoUtility;
use WCSMSOTP\Objects\Tabs;

$mowc_form_action                    = MoConstants::HOSTNAME . '/moas/login';
$mowc_redirect_url                   = MoConstants::HOSTNAME . '/moas/initializepayment';
$mowc_portal_host                    = MOV_WC_PORTAL . '/initializePayment';
$mowc_free_plan_name                 = 'FREE';
$mowc_gateway_plus_addon_name        = 'CUSTOM GATEWAY <br/>WITH ADDONS';
$mowc_twilio_gateway_plus_addon_name = 'TWILIO GATEWAY <br/>WITH ADDONS';
$mowc_enterprise_name                = 'ENTERPRISE PLAN';
$mowc_mo_gateway_plan_name           = 'MINIORANGE GATEWAY <br/>WITH ADDONS';
$mowc_free_plan_price                = 'Free';
$mowc_gateway_plus_addon             = '$29';
$mowc_twilio_gateway_plus_addon      = '$49';
$mowc_enterprise_addon               = '$99';
$mowc_mo_gateway_plan                = '$0';
$mowc_vl                             = MoUtility::mclv() && ! MoUtility::is_mg();
$mowc_nonce                          = $mowc_admin_handler->get_nonce_value();
$mowc_server_uri                     = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : null;
$mowc_form_settings                  = add_query_arg( array( 'page' => $mowc_tab_details->tab_details[ Tabs::FORMS ]->menu_slug ), $mowc_server_uri );

$mowc_free_plan_features = array(
	'WooCommerce Order Status SMS Notifications',
	'SMS Notifications to the Customers & Admins',
	'Replacable Order status Tags',
	'OTP Verification on WooCommerce Login, Registration Forms',
	'OTP Verification on WooCommerce Checkout Form',
	'Passwordless Login <br>(Login with Phone & OTP)',
);

$mowc_starter_plan_features = array(
	'WooCommerce Order Status SMS Notifications',
	'SMS Notifications to the Customers & Admins',
	'OTP Verification on WooCommerce Login, Registration Forms',
	'OTP Verification on WooCommerce Checkout Form',
	'Passwordless Login <br>(Login with Phone & OTP)',
);

$mowc_standard_plan_features = array(
	'<b>All features from Starter Plan</b>',
	'<span><a href="https://plugins.miniorange.com/supported-sms-email-gateways" target="_blank">Custom SMTP/HTTP SMS Gateway Supported</a></span>',
	'WooCommerce Password Reset Over OTP Verification',
	'Woocommerce Stock Notifications',
	'Twillio, MSG91 Gateway Supported',
);

$mowc_enterprise_plan_features = array(
	'<b>All features from Standard Plan</b>',
	'WooCommerce Premium Notifications tags supported',
	'OTP verification on WCFM & Checkout WC form',
	'<b style="color:#1261d8">OTP Spam Preventor </b> Addon Supported.',
	'Allow OTP for Selected Country Addon',
	'Extra premium forms support',
);

$mowc_pricing_view_file = MOV_WC_DIR . 'views/pricing.php';
if ( ! MoUtility::mo_require_file( $mowc_pricing_view_file, MOV_WC_DIR ) ) {
	return;
}
require $mowc_pricing_view_file;
