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

/**
 * ============================================
 * FILE: templates/emails/customer/appointment-reminder.php
 * Customer Appointment Reminder Email Content Template
 * ============================================
 */

// Get email header
do_action( 'rtrb_get_email_header', $email, $booking );

/**
* Hook: rtrb_email_before_content
*
* @hooked TemplateHooks::email_heading - 10
*/
do_action( 'rtrb_email_before_content', $email, $booking );

/**
* Hook: rtrb_email_content_start
*/
do_action( 'rtrb_email_content_start', $email, $booking );
?>

<!-- Email Content Text -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td class="main-content">
			<?php if ( ! empty( $settings['additional_content'] ) ) : ?>
				<?php echo wp_kses_post( wpautop( wptexturize( $settings['additional_content'] ) ) ); ?>
			<?php else : ?>
				<p style="margin: 0;"><?php esc_html_e( 'This is a friendly reminder about your upcoming appointment. Please make sure to arrive on time.', 'radius-booking' ); ?></p>
			<?php endif; ?>
		</td>
	</tr>
</table>

<?php
/**
 * Hook: rtrb_email_before_booking_details
 */
do_action( 'rtrb_email_before_booking_details', $email, $booking );
?>

<!-- Booking Details Box -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="booking-details">
	<tr>
		<td style="padding: 20px;">
			<?php
			/**
			 * Hook: rtrb_email_booking_details
			 *
			 * @hooked TemplateHooks::email_booking_details - 10
			 */
			do_action( 'rtrb_email_booking_details', $email, $booking );
			?>
		</td>
	</tr>
</table>

<?php
/**
 * Hook: rtrb_email_after_booking_details
 */
do_action( 'rtrb_email_after_booking_details', $email, $booking );
?>

<?php if ( ! empty( $settings['footer_text'] ) ) : ?>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td class="footer-text">
				<?php
				echo wp_kses_post(
					wpautop(
						wptexturize( $settings['footer_text'] )
					)
				);
				?>
			</td>
		</tr>
	</table>
<?php endif; ?>

<?php
/**
 * Hook: rtrb_email_before_button
 */
do_action( 'rtrb_email_before_button', $email, $booking );
?>

<?php if ( ! empty( $settings['button_text'] ) ) : ?>
	<!-- Button -->
	<?php
	/**
	 * Hook: rtrb_email_button
	 *
	 * @hooked TemplateHooks::email_button - 10
	 */
	do_action( 'rtrb_email_button', $email, $booking, $settings );
	?>
<?php endif; ?>

<?php
/**
 * Hook: rtrb_email_content_end
 */
do_action( 'rtrb_email_content_end', $email, $booking );
?>

<?php
/**
 * Hook: rtrb_email_after_content
 *
 * @hooked TemplateHooks::email_booking_id - 10
 */
do_action( 'rtrb_email_after_content', $email, $booking );

// Get email footer
do_action( 'rtrb_get_email_footer', $email, $booking );
?>
