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

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

$mowc_handler                    = WcProfileForm::instance();
$mowc_wc_acc_enabled             = $mowc_handler->is_form_enabled() ? 'checked' : '';
$mowc_wc_acc_hidden              = 'checked' === $mowc_wc_acc_enabled ? '' : 'hidden';
$mowc_wc_acc_enabled_type        = $mowc_handler->get_otp_type_enabled();
$mowc_wc_profile_field_key       = $mowc_handler->get_phone_key_details();
$mowc_wc_acc_forms               = admin_url() . 'my-account/edit-account/';
$mowc_wc_acc_type_phone          = $mowc_handler->get_phone_html_tag();
$mowc_wc_acc_type_email          = $mowc_handler->get_email_html_tag();
$mowc_wc_acc_restrict_duplicates = $mowc_handler->restrict_duplicates() ? 'checked' : '';
$mowc_form_name                  = $mowc_handler->get_form_name();
$mowc_wc_acc_button_text         = $mowc_handler->get_button_text();

$mowc_profile_form_file = MOV_WC_DIR . 'views/forms/mowcprofileform.php';
if ( ! MoUtility::mo_require_file( $mowc_profile_form_file, MOV_WC_DIR ) ) {
	return;
}
require_once $mowc_profile_form_file;
