<?php
/**
 * Exclude fields from updating settings block.
 *
 * @package EventimUSEventListings
 */

defined( 'ABSPATH' ) || exit;
?>
<div class="dashboard-module">
	<div class="module-header">
		<h1><?php esc_html_e( 'Exclude Fields From Updating', 'eventim-us-event-listings' ); ?></h1>
		<h4><?php esc_html_e( 'These fields will populate accurately on the initial event feed import and then will avoid updating accurate information on every import after. This will allow you to customize these fields without the event data overwriting them.', 'eventim-us-event-listings' ); ?>
		</h4>
	</div>
	<div class="module-content">
		<div class="exclude-fields-container">
			<?php foreach ( evusel_get_update_excludable_fields() as $evusel_acfField ) : ?>
				<div class="exclude-field-item">
					<input type="checkbox" id="<?php echo esc_attr( $evusel_acfField['key'] ); ?>"
						name="<?php echo esc_attr( "evusel_settings[api][api_exclude_list][{$evusel_acfField['name']}]" ); ?>"
						<?php echo $evuselConfig->get( 'api.api_exclude_list.' . $evusel_acfField['name'] ) === 'on' ? 'checked' : ''; ?>>
					<label
						for="<?php echo esc_attr( $evusel_acfField['key'] ); ?>"><?php echo esc_html( $evusel_acfField['label'] ); ?></label>
				</div>
			<?php endforeach; ?>
		</div>
	</div>
</div>