<?php
/**
 * GFB Customer Appointment View Front-end
 *
 * @package GFB.
 */

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

<div class="apbgf-custom-top-nav-wrapper">
	<?php
	if ( 'apbgf-appointment' === $post_type ) {
		?>
		<div class="apbgf-appointment-filter-container">
			<div id="reportrange">
				<i class="fa fa-calendar"></i>&nbsp;
				<span></span> <i class="fa fa-caret-down"></i>
				<input type="hidden" name="date_from" readonly />
				<input type="hidden" name="date_to" readonly />
				<?php 
				$nonce = wp_create_nonce('apbgf-appointment-filter-nonce-action');
				echo '<input type="hidden" name="apbgf-appointment-filter-nonce" value="' . esc_attr( $nonce ) . '" />';
				?>
			</div>
		</div>
		<?php
	}
	?>

	<select name="apbgf_export_type" id="apbgf-export-type" class="disabled-block" disabled>
		<option value=""><?php echo esc_html__('Select Export Format', 'appointment-and-booking-for-gravity-forms'); ?></option>
		<option value="csv"><?php echo esc_html__('CSV', 'appointment-and-booking-for-gravity-forms'); ?></option>
	</select>

	<input type="submit" class="disabled-block" id="apbgf-export" name="apbgf-export-submit" disabled value="<?php echo esc_html__('Export', 'appointment-and-booking-for-gravity-forms'); ?>" />
	<?php
		$nonce = wp_create_nonce('apbgf_export_nonce_action');
		echo '<input type="hidden" name="apbgf_export_nonce" value="' . esc_attr($nonce) . '"/>';
	?>
	<?php
	if ( 'apbgf-customer' === $post_type ) {
		?>
		<a class="apbgf-add-button" data-id="apbgf-import-modal" href="#"><?php echo esc_html__('Import', 'appointment-and-booking-for-gravity-forms'); ?></a>
		<?php
	}
	?>
</div>

