<?php
defined( 'ABSPATH' ) || exit;

/**
 * @var string $current_tab defined in base settings page
 * @var array $w2pshop_settings defined in base settings page
 */

if ( 'advanced' === $current_tab ) { ?>
	<table class="form-table">
		<tbody>
			<?php
			W2PShopSettings::generate_settings_header_html( 'Save Design Settings' );

			W2PShopSettings::generate_settings_checkbox_html(
				'Enable Save Design Feature',
				'w2pshop_core_saved_data',
				'If enabled, user will be able to save designs for future use',
				$w2pshop_settings['w2pshop_core_saved_data']
			);

			// Check to see if W2PShop PDF EditorS is Activated.
			if ( is_plugin_active( 'w2pshop-pdfeditor/w2pshop-pdfeditor.php' ) ) {
				W2PShopSettings::generate_settings_checkbox_html(
					'Enable AI data presets based on historical data',
					'w2pshop_core_saved_historical_data',
					'If enabled, system will populate the preset data based on historical data (if available)',
					$w2pshop_settings['w2pshop_core_saved_historical_data']
				);
			}

			W2PShopSettings::generate_settings_header_html( 'Proofing Settings' );

			W2PShopSettings::generate_settings_checkbox_html(
				'Enable Product Proofing',
				'w2pshop_core_proofing',
				'If enabled, the user will be shown a preview before adding the item to the cart',
				$w2pshop_settings['w2pshop_core_proofing']
			);

			W2PShopSettings::generate_settings_input_html(
				'Set confirmation label',
				'w2pshop_confirmation_label',
				$w2pshop_settings['w2pshop_confirmation_label'],
				false,
				false,
				'Override the default confirmation label'
			);

			W2PShopSettings::generate_settings_ace_editor_html(
				'Proofing terms',
				'w2pshop_proofing_confirmation_text',
				$w2pshop_settings['w2pshop_proofing_confirmation_text'],
				'Terms and conditions for proofing.',
				'html'
			);
			?>
		</tbody>
	</table>
    <?php
}
?>
