<?php
/**
 * GFB Service Modal
 *
 * @package GFB.
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

?>

<div id="apbgf-import-modal" class="modal">
	<div class="modal__content apbgf_fancy_scroll">
		<h2><?php echo esc_html__('Import', 'appointment-and-booking-for-gravity-forms'); ?></h2>
		<p><?php echo esc_html__('You may import list of customers in CSV format', 'appointment-and-booking-for-gravity-forms'); ?></p>

		<form id="apbgf-customer-import-form" autocomplete="off" class="modal--form">            
			<div class="form-col-full">
				<label for="apbgf-name"><?php echo esc_html__('Select File*', 'appointment-and-booking-for-gravity-forms'); ?></label>
				<input type="file" id="apbgf-file" accept=".csv" required><br/>
				<small>
				<?php 
					// translators: %1$d is the maximum number of customers that can be imported, %2$s is the link to download sample CSV file and %3$s is the closing anchor tag.
					printf(esc_html__('CSV file only, max %1$d customers. %2$sClick here%3$s to download sample CSV file.', 'appointment-and-booking-for-gravity-forms'), 100, '<a href="' . esc_url( APBGF_URL ) . 'sample/sample-customer.csv" download>', '</a>');
				?>
				</small>
			</div>

			<input class="save--modal" type="submit" value="Save">

			<div class="apbgf-response"></div>
		</form>

		<a href="#" class="modal__close">&times;</a>
	</div>
</div>
