<?php
if(!defined('ABSPATH')) exit;
$bizcalendar_web_enableNewsletter = get_option('setrio_bizcal_enable_newsletter', 1);
$bizcalendar_web_key = basename(__FILE__, '_email.php');
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
$args['key'] = $bizcalendar_web_key;

if($bizcalendar_web_enableNewsletter){
	$bizcalendar_web_lblNewsletter = setrio_bizcal_message('lblNewsletter');
		
	$bizcalendar_web_lblNewsletter = preg_replace("/(<a)(\s)/",'\1 v-on:click.stop="1" \2', $bizcalendar_web_lblNewsletter);
	// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
	$args['wargs'] = array_replace((isset($args['wargs']) ? $args['wargs'] : array()), array(
		'label' => $bizcalendar_web_lblNewsletter,
	));
	setrio_bizcal_get_template_part('vue/part/checkbox', $args);
} else {
	setrio_bizcal_get_template_part('vue/part/input', $args);
}