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

defined( 'ABSPATH' ) || exit;
?>

<div class="dashboard-module">
	<div class="module-header">
		<h3><?php esc_html_e( 'Exclude Fields From Updating 2', 'eventim-us-event-listings' ); ?></h3>
	</div>
	<div class="module-content">
		<?php foreach ( evusel_get_update_excludable_fields() as $evusel_acfField ) : ?>
			<div class="exclude-field">
				<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>