<?php
/**
 * Clock-in confirmation email body.
 *
 * @package MerchantKits\AttendanceManager
 *
 * @var array $attendance Attendance row.
 * @var array $employee   Employee row.
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$name = isset( $employee ) ? MKAM_Employee::full_name( $employee ) : '';
$time = isset( $attendance['clock_in'] ) ? $attendance['clock_in'] : '';
?>
<?php /* translators: %s: employee name. */ ?>
<p><?php printf( esc_html__( 'Hi %s,', 'merchantkits-attendance-manager' ), esc_html( $name ) ); ?></p>
<p>
	<?php
	/* translators: %s: clock-in time. */
	printf( esc_html__( 'Your clock-in was recorded at %s.', 'merchantkits-attendance-manager' ), '<strong>' . esc_html( $time ) . '</strong>' );
	?>
</p>
<?php if ( ! empty( $attendance['late_minutes'] ) ) : ?>
	<p style="color:#dc2626;">
		<?php
		/* translators: %d: minutes late. */
		printf( esc_html__( 'You were %d minute(s) late today.', 'merchantkits-attendance-manager' ), (int) $attendance['late_minutes'] );
		?>
	</p>
<?php endif; ?>
