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

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

$mowc_handler                 = WooCommerceBilling::instance();
$mowc_wc_billing_enable       = (bool) $mowc_handler->is_form_enabled() ? 'checked' : '';
$mowc_wc_billing_hidden       = 'checked' === $mowc_wc_billing_enable ? '' : 'hidden';
$mowc_wc_billing_type_enabled = $mowc_handler->get_otp_type_enabled();
$mowc_wc_billing_type_phone   = $mowc_handler->get_phone_html_tag();
$mowc_wc_billing_type_email   = $mowc_handler->get_email_html_tag();
$mowc_wc_restrict_duplicates  = (bool) $mowc_handler->restrict_duplicates() ? 'checked' : '';
$mowc_button_text             = $mowc_handler->get_button_text();
$mowc_form_name               = $mowc_handler->get_form_name();

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