<?php
/**
 * Other Settings Section
 *
 * This file renders the "Other Settings" section in the Pixelio Cart Abandon Recovery More plugin.
 * It includes GDPR consent options, Google MAP API key, Smart Shopping Insights, and user exclusion settings.
 *
 * @package PixelioCartAbandonRecoveryMore\Admin\Views
 */

use PixelioCartAbandonRecoveryMore\Includes\Utils\Pixelio_Cart_Abandon_Recovery_More_Util;
use PixelioCartAbandonRecoveryMore\Admin\Views\Reusable\Pixelio_Cart_Abandon_Recovery_More_Checkbox;
use PixelioCartAbandonRecoveryMore\Admin\Views\Reusable\Pixelio_Cart_Abandon_Recovery_More_Input_Text;
use PixelioCartAbandonRecoveryMore\Admin\Views\Reusable\Pixelio_Cart_Abandon_Recovery_More_Section_Title;

if ( ! defined( 'ABSPATH' ) ) exit;
?>

<div class="pixelio-cart-abandon-recovery-more-page-section">
	<?php
	$pixelio_cart_abandon_recovery_more_gdpr_title_section = new Pixelio_Cart_Abandon_Recovery_More_Section_Title( esc_html( __( 'GDPR settings', 'rivio-ai-cart-recovery-marketing-email-automation' ) ) );
	$pixelio_cart_abandon_recovery_more_gdpr_title_section->pixelio_cart_abandon_recovery_more_get_views();

	$pixelio_cart_abandon_recovery_more_first_two_checkbox_array = array(
		'consent' => array(
			'label'       => esc_html__(
				'Enable GDPR Consent & Privacy-Friendly Analytics',
				'rivio-ai-cart-recovery-marketing-email-automation'
			),
			'description' => esc_html__(
				'Ask visitors for consent before collecting personal data. Users who do not consent will still be included in anonymous, aggregated analytics to help you understand store performance while respecting visitor privacy. When disabled, Rivio will not manage consent requests. The website owner remains responsible for compliance with GDPR, ePrivacy, and any other applicable privacy regulations.',
				'rivio-ai-cart-recovery-marketing-email-automation'
			),
			'name'        => 'pixelio-cart-abandon-recovery-more-gdpr-consent-checkbox',
			'pro'         => false,
			'preview'     => false,
			'edit'        => false,
		),
	);
	foreach ( $pixelio_cart_abandon_recovery_more_first_two_checkbox_array as $pixelio_cart_abandon_recovery_more_key => $pixelio_cart_abandon_recovery_more_value ) {
		$pixelio_cart_abandon_recovery_more_checkbox = new Pixelio_Cart_Abandon_Recovery_More_Checkbox( $pixelio_cart_abandon_recovery_more_value['label'], $pixelio_cart_abandon_recovery_more_value['description'], $pixelio_cart_abandon_recovery_more_value['name'], $pixelio_cart_abandon_recovery_more_value['pro'] );
		$pixelio_cart_abandon_recovery_more_checkbox->pixelio_cart_abandon_recovery_more_get_views();
		$pixelio_cart_abandon_recovery_more_saved_settings[] = $pixelio_cart_abandon_recovery_more_checkbox->get_saved_value();
	}

	$pixelio_cart_abandon_recovery_more_google_map_api_key = new Pixelio_Cart_Abandon_Recovery_More_Input_Text(
		esc_html( __( 'Google MAP API key', 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
		esc_html( __( 'You can find your own licence key on the email sended to you by Pixelio', 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
		esc_html( __( 'Please provide your Google MAP API key', 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
		'pixelio-cart-abandon-recovery-more-google-map-api-key',
		'pixelio-cart-abandon-recovery-more-gdpr-dynamic-consent-checkbox',
		1,
		true
	);
	$pixelio_cart_abandon_recovery_more_google_map_api_key->pixelio_cart_abandon_recovery_more_get_views();
	$pixelio_cart_abandon_recovery_more_saved_settings[] = $pixelio_cart_abandon_recovery_more_google_map_api_key->get_saved_value();



	$pixelio_cart_abandon_recovery_more_google_map_api_key = new Pixelio_Cart_Abandon_Recovery_More_Input_Text(
		esc_html( __( 'Exclude following user', 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
		esc_html( __( 'The following email will be excluded by the tracking if provided', 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
		esc_attr( __( 'Start writing email to show up some proposal', 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
		'pixelio-cart-abandon-recovery-more-gdpr-connected-exclusion-api-key',
		'pixelio-cart-abandon-recovery-more-gdpr-connected-consent-checkbox',
		1,
		true
	);
	$pixelio_cart_abandon_recovery_more_google_map_api_key->pixelio_cart_abandon_recovery_more_get_views();
	$pixelio_cart_abandon_recovery_more_saved_settings[] = $pixelio_cart_abandon_recovery_more_google_map_api_key->get_saved_value();

	?>
</div>
