<?php
/**
 * Products Settings Section
 *
 * This file renders the "Products Settings" section in the Pixelio Cart Abandon Recovery More plugin.
 * It includes checkboxes and input fields for sending review emails and adding discounts for reviews.
 *
 * @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_product_title_section = new Pixelio_Cart_Abandon_Recovery_More_Section_Title( esc_html( __( 'Products settings', 'rivio-ai-cart-recovery-marketing-email-automation' ) ) );
	$pixelio_cart_abandon_recovery_more_product_title_section->pixelio_cart_abandon_recovery_more_get_views();


	$pixelio_cart_abandon_recovery_more_first_two_checkbox_array = array(
		'stock' => array(
			'label'       => esc_html( __( 'Send Post-Delivery Review Emails', 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
			'description' => esc_html__(
				'Increase customer reviews by automatically sending personalized post-delivery review request emails. If GDPR Consent is enabled, emails will only be sent to customers who have explicitly opted in to receive marketing communications.',
				'rivio-ai-cart-recovery-marketing-email-automation'
			),
			'name'        => 'pixelio-cart-abandon-recovery-more-request-review-checkbox',
			'pro'         => false,
			'preview'     => false,
			'edit'        => false,
			'dependency'  => '',
			'onshow' => 'pixelio-cart-abandon-recovery-more-request-review-with-promo-checkbox'
		),
//		'timer' => array(
//			'label'       => esc_html( __( 'Add a discount on next shop when requesting a review', 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
//			'description' => esc_html( __( 'Allow the plugin to add a promo code on the mail to get more review', 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
//			'name'        => 'pixelio-cart-abandon-recovery-more-request-review-with-promo-checkbox',
//			'pro'         => false,
//			'preview'     => false,
//			'edit'        => false,
//			'dependency'  => 'pixelio-cart-abandon-recovery-more-request-review-checkbox',
//			'onshow' => 'pixelio-cart-abandon-recovery-more-request-review-discount'
//		),
	);
	foreach ( $pixelio_cart_abandon_recovery_more_first_two_checkbox_array as $pixelio_key => $pixelio_value ) {
		$pixelio_cart_abandon_recovery_more_checkbox = new Pixelio_Cart_Abandon_Recovery_More_Checkbox( $pixelio_value['label'], $pixelio_value['description'], $pixelio_value['name'], $pixelio_value['pro'], false, false, '', '', $pixelio_value['dependency'],false,"","",$pixelio_value['onshow'] );
		$pixelio_cart_abandon_recovery_more_checkbox->pixelio_cart_abandon_recovery_more_get_views();
		$pixelio_saved_setting[] = $pixelio_cart_abandon_recovery_more_checkbox->get_saved_value();
	}
//
//	$pixelio_cart_abandon_recovery_more_discount_for_review = new Pixelio_Cart_Abandon_Recovery_More_Input_Text(
//		esc_html( __( 'Discount percentage authorized', 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
//		esc_html( __( "Please provide a maximum of discount on the next order you authorize to get a review. If you don't specify, our algorithm will optimize it. (Only used in IA mode)", 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
//		esc_html( __( 'Please provide an discount between 1 and 99 followed by the percent or by €', 'rivio-ai-cart-recovery-marketing-email-automation' ) ),
//		'pixelio-cart-abandon-recovery-more-request-review-discount',
//		'pixelio-cart-abandon-recovery-more-request-review-with-promo-checkbox',
//		0
//	);
//	$pixelio_cart_abandon_recovery_more_discount_for_review->pixelio_cart_abandon_recovery_more_get_views();
//	$pixelio_saved_setting[] = $pixelio_cart_abandon_recovery_more_discount_for_review->get_saved_value();
	?>
</div>
