<?php
/**
 * Load view for premium SMS Notifications List
 *
 * @package miniorange-sms-order-notification-otp-verification/controllers
 */

use WCSMSOTP\Helper\MoUtility;

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

	$mowc_premium_notifications = array(
		'dokannotif' => array(
			'subtab'      => 'dokanNotifSubTab',
			'filename'    => 'dokannotif',
			'discription' => 'Enable Order Status Notifications for the Vendors On Dokan Platform. <br><br><b> Dokan Notifications</b> is a premium plan feature.  Check <a class="font-semibold text-yellow-500" target="_blank" href="' . esc_url( $mowc_license_url ) . '">Licensing Tab</a> to learn more.</a>',
		),
		'wcfmnotif'  => array(
			'subtab'      => 'wcfmNotifSubTab',
			'filename'    => 'wcfmsmsnotification',
			'discription' => 'Enable Order Status Notifications for the Vendors On WCFM Platform. <br><br> <b>WCFM Notifications</b> is a premium plan feature.  Check <a class="font-semibold text-yellow-500" target="_blank" href="' . esc_url( $mowc_license_url ) . '">Licensing Tab</a> to learn more.</a>',
		),
		'formNotif'  => array(
			'subtab'      => 'formNotifSubTab',
			'filename'    => 'formsmsnotification',
			'discription' => 'Enable SMS Notifications on submission of Login, Registration and Contact Forms. <br><br> <b>Forms Notifications</b> is a premium feature. Contact us at <a style="cursor:pointer;" onClick="otpSupportOnClickWC(\'Hi, I am Interested in the Forms Notification feature. Provide me with the more information.\');"><u> otpsupport@xecurify.com</u></a> to know more',
		),
	);

	foreach ( $mowc_premium_notifications as $mowc_notif => $mowc_notif_subtab ) {

			$mowc_premium_notif_hidden = $mowc_notif_subtab['subtab'] !== $mowc_subtab ? 'hidden' : '';
			$mowc_premium_notif_id     = $mowc_notif_subtab['subtab'] . 'Container';
		if ( is_dir( MOV_WC_DIR . '/notifications/' . $mowc_notif_subtab['filename'] ) ) {
			$mowc_notif_controller_file = MOV_WC_DIR . 'notifications/' . $mowc_notif_subtab['filename'] . '/controllers/main-controller.php';
			if ( ! MoUtility::mo_require_file( $mowc_notif_controller_file, MOV_WC_DIR ) ) {
				continue;
			}
			require_once $mowc_notif_controller_file;
		} else {
			$mowc_wc_premium_notif_view_file = MOV_WC_DIR . '/views/wc-premium-notifications.php';
			if ( ! MoUtility::mo_require_file( $mowc_wc_premium_notif_view_file, MOV_WC_DIR ) ) {
				continue;
			}
			require $mowc_wc_premium_notif_view_file;
		}
	}
