<?php
/**
 * Load admin view for WooCommerceProductVendors.
 *
 * @package miniorange-sms-order-notification-otp-verification/controllers/forms/
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}
use WCSMSOTP\Handler\Forms\WooCommerceProductVendors;
use WCSMSOTP\Helper\MoUtility;

$mowc_handler                   = WooCommerceProductVendors::instance();
$mowc_wc_pv_registration        = (bool) $mowc_handler->is_form_enabled() ? 'checked' : '';
$mowc_wc_pv_hidden              = 'checked' === $mowc_wc_pv_registration ? '' : 'hidden';
$mowc_wc_pv_enable_type         = $mowc_handler->get_otp_type_enabled();
$mowc_wc_pv_restrict_duplicates = (bool) $mowc_handler->restrict_duplicates() ? 'checked' : '';
$mowc_wc_pv_reg_type_phone      = $mowc_handler->get_phone_html_tag();
$mowc_wc_pv_reg_type_email      = $mowc_handler->get_email_html_tag();
$mowc_wc_pv_reg_type_both       = $mowc_handler->get_both_html_tag();
$mowc_form_name                 = $mowc_handler->get_form_name();
$mowc_is_ajax_form              = $mowc_handler->is_ajax_form();
$mowc_is_ajax_mode_enabled      = $mowc_is_ajax_form ? 'checked' : '';
$mowc_wc_pv_button_text         = $mowc_handler->get_button_text();

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