<?php

namespace SugarCalendarBookings\Notifications\Emails;

/**
 * Email notification defaults.
 *
 * @since 1.0.0
 */
class EmailDefaults {

	/**
	 * Get the default booking confirmation email to attendee.
	 *
	 * @since 1.0.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_booking_confirmation_attendee() {

		return [
			'enabled' => true,
			'subject' => esc_html__( 'Appointment Confirmation: {service_name}', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_booking_confirmation_attendee_content(),
		];
	}

	/**
	 * Get the default booking confirmation email to employee.
	 *
	 * @since 1.0.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_booking_confirmation_employee() {

		return [
			'enabled' => true,
			'subject' => esc_html__( 'New Confirmed Appointment: {service_name}', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_booking_confirmation_employee_content(),
		];
	}

	/**
	 * Get the default pending booking email to attendee.
	 *
	 * @since 1.0.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_booking_pending_attendee() {

		return [
			'enabled' => true,
			'subject' => esc_html__( 'New Booking: {service_name}', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_booking_pending_attendee_content(),
		];
	}

	/**
	 * Get the default pending booking email to employee.
	 *
	 * @since 1.0.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_booking_pending_employee() {

		return [
			'enabled' => true,
			'subject' => esc_html__( 'New Appointment Request (Pending): {service_name}', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_booking_pending_employee_content(),
		];
	}

	/**
	 * Get the default booking update email to attendee.
	 *
	 * @since 1.0.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_booking_update_attendee() {

		return [
			'enabled' => true,
			'subject' => esc_html__( 'Appointment updated: {service_name}', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_booking_update_attendee_content(),
		];
	}

	/**
	 * Get the default booking update email to employee.
	 *
	 * @since 1.0.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_booking_update_employee() {

		return [
			'enabled' => true,
			'subject' => esc_html__( 'Appointment updated: {service_name}', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_booking_update_employee_content(),
		];
	}

	/**
	 * Get the default booking cancellation email to attendee.
	 *
	 * @since 1.0.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_booking_cancellation_attendee() {

		return [
			'enabled' => true,
			'subject' => esc_html__( 'Appointment cancelled: {service_name}', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_booking_cancellation_attendee_content(),
		];
	}

	/**
	 * Get the default booking cancellation email to employee.
	 *
	 * @since 1.0.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_booking_cancellation_employee() {

		return [
			'enabled' => true,
			'subject' => esc_html__( 'Appointment cancelled: {service_name}', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_booking_cancellation_employee_content(),
		];
	}

	/**
	 * Get the default appointment reminder email to attendee.
	 *
	 * @since 1.0.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_appointment_reminder_attendee() {

		return [
			'enabled' => true,
			'subject' => esc_html__( 'Appointment Reminder: {service_name}', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_appointment_reminder_attendee_content(),
		];
	}

	/**
	 * Get the default appointment reminder email to employee.
	 *
	 * @since 1.0.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_appointment_reminder_employee() {

		return [
			'enabled' => true,
			'subject' => esc_html__( 'Appointment Reminder: {service_name}', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_appointment_reminder_employee_content(),
		];
	}

	/**
	 * Get the default payment refund email to attendee.
	 *
	 * @since 1.1.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_payment_refund_attendee() {

		return [
			'enabled' => true,
			'subject' => esc_html__( 'Payment Refunded: {service_name}', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_payment_refund_attendee_content(),
		];
	}

	/**
	 * Get the default booking confirmation email content for attendee.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	private static function get_booking_confirmation_attendee_content() {

		ob_start();
		?>

		<p>
			<?php
			printf( /* translators: %1$s - customer full name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{customer_full_name}'
			);
			?>
		</p>

		<p>
			<?php
			printf( /* translators: %1$s - service name. */
				esc_html__( 'Your %1$s appointment has been confirmed.', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{service_name}'
			);
			?>
		</p>

		<p>
			<strong>
				<?php esc_html_e( 'Appointment Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong>
		</p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - service name. */
					esc_html__( 'Service: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{service_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - start date; %2$s - start time; %3$s - end time. */
					esc_html__( 'Date & time: %1$s, %2$s - %3$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{start_date}',
					'{start_time}',
					'{end_time}'
				);
				?>
			</li>

			{location_name}
		</ul>

		<p><strong>
				<?php esc_html_e( 'Order Summary', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<p>{order_summary_breakdown}</p>

		<hr style="border: none; border-top: 1px solid #ddd; margin: 20px 0;">
		<p style="font-size: 12px; color: #666;">
			<?php esc_html_e( 'If you need to cancel this appointment, please use the link below:', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			<a href="{cancellation_url}" style="color: #dc3232;"><?php esc_html_e( 'Cancel Appointment', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?></a>
		</p>

		<?php

		return ob_get_clean();
	}

	/**
	 * Get the default booking confirmation email content for employee.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	private static function get_booking_confirmation_employee_content() {

		ob_start();
		?>

		<p>
			<?php
			printf( /* translators: %1$s - employee full name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{employee_full_name}'
			);
			?>
		</p>

		<p>
			<?php
			printf( /* translators: %1$s - customer full name. */
				esc_html__( 'You have received a new appointment from %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{customer_full_name}'
			);
			?>
		</p>

		<p><strong>
				<?php esc_html_e( 'Customer Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - customer full name. */
					esc_html__( 'Full Name: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{customer_full_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - customer email. */
					esc_html__( 'Email: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{customer_email}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - customer phone. */
					esc_html__( 'Phone: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{customer_phone}'
				);
				?>
			</li>
		</ul>

		<p><strong>
				<?php esc_html_e( 'Appointment Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - service name. */
					esc_html__( 'Service: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{service_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - start date; %2$s - start time; %3$s - end time. */
					esc_html__( 'Date & time: %1$s, %2$s - %3$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{start_date}',
					'{start_time}',
					'{end_time}'
				);
				?>
			</li>

			{location_name}
		</ul>

		<p><strong>
				<?php esc_html_e( 'Order Summary', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<p>{order_summary_breakdown}</p>

		<p>
			<a href="{appointment_admin_url}">
				<?php esc_html_e( 'View appointment', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</a>
		</p>

		<?php

		return ob_get_clean();
	}

	/**
	 * Get the default pending booking email content for attendee.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	private static function get_booking_pending_attendee_content() {

		ob_start();
		?>

		<p>
			<?php
			printf( /* translators: %1$s - customer full name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{customer_full_name}'
			);
			?>
		</p>

		<p>
			<?php esc_html_e( 'Thank you for your booking! It will be reviewed and you\'ll be notified about the confirmation soon.', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
		</p>

		<p>
			<strong>
				<?php esc_html_e( 'Appointment Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong>
		</p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - service name. */
					esc_html__( 'Service: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{service_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - start date; %2$s - start time; %3$s - end time. */
					esc_html__( 'Date & time: %1$s, %2$s - %3$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{start_date}',
					'{start_time}',
					'{end_time}'
				);
				?>
			</li>

			{location_name}
		</ul>

		<p><strong>
				<?php esc_html_e( 'Order Summary', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<p>{order_summary_breakdown}</p>

		<hr style="border: none; border-top: 1px solid #ddd; margin: 20px 0;">
		<p style="font-size: 12px; color: #666;">
			<?php esc_html_e( 'If you need to cancel this appointment, please use the link below:', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			<a href="{cancellation_url}" style="color: #dc3232;"><?php esc_html_e( 'Cancel Appointment', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?></a>
		</p>

		<?php

		return ob_get_clean();
	}

	/**
	 * Get the default pending booking email content for employee.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	private static function get_booking_pending_employee_content() {

		ob_start();
		?>

		<p>
			<?php
			printf( /* translators: %1$s - employee full name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{employee_full_name}'
			);
			?>
		</p>

		<p>
			<?php
			printf( /* translators: %1$s - customer full name. */
				esc_html__( 'You have received a new appointment request from %1$s (awaiting approval)', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{customer_full_name}'
			);
			?>
		</p>

		<p><strong>
				<?php esc_html_e( 'Customer Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - customer full name. */
					esc_html__( 'Full Name: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{customer_full_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - customer email. */
					esc_html__( 'Email: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{customer_email}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - customer phone. */
					esc_html__( 'Phone: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{customer_phone}'
				);
				?>
			</li>
		</ul>

		<p><strong>
				<?php esc_html_e( 'Appointment Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - service name. */
					esc_html__( 'Service: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{service_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - start date; %2$s - start time; %3$s - end time. */
					esc_html__( 'Date & time: %1$s, %2$s - %3$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{start_date}',
					'{start_time}',
					'{end_time}'
				);
				?>
			</li>

			{location_name}
		</ul>

		<p><strong>
				<?php esc_html_e( 'Order Summary', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<p>{order_summary_breakdown}</p>

		<p>
			<?php
			printf( /* translators: %1$s - link open tag; %2$s - link close tag. */
				esc_html__( 'Please, approve or cancel this %1$sappointment%2$s.', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'<a href="{appointment_admin_url}">',
				'</a>'
			);
			?>
		</p>

		<?php

		return ob_get_clean();
	}

	/**
	 * Get the default booking update email content for attendee.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	private static function get_booking_update_attendee_content() {

		ob_start();
		?>

		<p>
			<?php
			printf( /* translators: %1$s - customer full name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{customer_full_name}'
			);
			?>
		</p>

		<p>
			<?php
			printf( /* translators: %1$s - service name. */
				esc_html__( 'Your %1$s appointment has been updated.', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{service_name}'
			);
			?>
		</p>

		<p><strong>
				<?php esc_html_e( 'Appointment Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - service name. */
					esc_html__( 'Service: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{service_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - start date; %2$s - start time; %3$s - end time. */
					esc_html__( 'Date & time: %1$s, %2$s - %3$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{start_date}',
					'{start_time}',
					'{end_time}'
				);
				?>
			</li>

			{location_name}
		</ul>

		<p><strong>
				<?php esc_html_e( 'Order Summary', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<p>{order_summary_breakdown}</p>

		<hr style="border: none; border-top: 1px solid #ddd; margin: 20px 0;">
		<p style="font-size: 12px; color: #666;">
			<?php esc_html_e( 'If you need to cancel this appointment, please use the link below:', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			<a href="{cancellation_url}" style="color: #dc3232;"><?php esc_html_e( 'Cancel Appointment', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?></a>
		</p>
		<?php

		return ob_get_clean();
	}

	/**
	 * Get the default booking update email content for employee.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	private static function get_booking_update_employee_content() {

		ob_start();
		?>

		<p>
			<?php
			printf( /* translators: %1$s - employee full name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{employee_full_name}'
			);
			?>
		</p>

		<p>
			<?php
			printf( /* translators: %1$s - customer full name. */
				esc_html__( 'An appointment with %1$s has been updated.', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{customer_full_name}'
			);
			?>
		</p>

		<p><strong>
				<?php esc_html_e( 'Appointment Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - service name. */
					esc_html__( 'Service: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{service_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - start date; %2$s - start time; %3$s - end time. */
					esc_html__( 'Date & time: %1$s, %2$s - %3$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{start_date}',
					'{start_time}',
					'{end_time}'
				);
				?>
			</li>

			{location_name}
		</ul>

		<p><strong>
				<?php esc_html_e( 'Order Summary', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<p>{order_summary_breakdown}</p>

		<p>
			<a href="{appointment_admin_url}">
				<?php esc_html_e( 'View appointment', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</a>
		</p>
		<?php

		return ob_get_clean();
	}

	/**
	 * Get the default booking cancellation email content for attendee.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	private static function get_booking_cancellation_attendee_content() {

		ob_start();
		?>

		<p>
			<?php
			printf( /* translators: %1$s - customer full name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{customer_full_name}'
			);
			?>
		</p>

		<p>
			<?php
			printf( /* translators: %1$s - service name. */
				esc_html__( 'Your %1$s appointment has been cancelled.', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{service_name}'
			);
			?>
		</p>

		<p><strong>
				<?php esc_html_e( 'Appointment Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - service name. */
					esc_html__( 'Service: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{service_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - start date; %2$s - start time; %3$s - end time. */
					esc_html__( 'Date & time: %1$s, %2$s - %3$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{start_date}',
					'{start_time}',
					'{end_time}'
				);
				?>
			</li>

			{location_name}
		</ul>

		<p><strong>
				<?php esc_html_e( 'Order Summary', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<p>{order_summary_breakdown}</p>
		<?php

		return ob_get_clean();
	}

	/**
	 * Get the default booking cancellation email content for employee.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	private static function get_booking_cancellation_employee_content() {

		ob_start();
		?>

		<p>
			<?php
			printf( /* translators: %1$s - employee full name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{employee_full_name}'
			);
			?>
		</p>

		<p>
			<?php
			printf( /* translators: %1$s - customer full name. */
				esc_html__( 'An appointment with %1$s has been cancelled.', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{customer_full_name}'
			);
			?>
		</p>

		<p><strong>
				<?php esc_html_e( 'Appointment Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - service name. */
					esc_html__( 'Service: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{service_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - start date; %2$s - start time; %3$s - end time. */
					esc_html__( 'Date & time: %1$s, %2$s - %3$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{start_date}',
					'{start_time}',
					'{end_time}'
				);
				?>
			</li>

			{location_name}
		</ul>

		<p><strong>
				<?php esc_html_e( 'Order Summary', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<p>{order_summary_breakdown}</p>

		<p>
			<a href="{appointment_admin_url}">
				<?php esc_html_e( 'View appointment', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</a>
		</p>
		<?php

		return ob_get_clean();
	}

	/**
	 * Get the default appointment reminder email content for attendee.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	private static function get_appointment_reminder_attendee_content() {

		ob_start();
		?>

		<p>
			<?php
			printf( /* translators: %1$s - customer full name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{customer_full_name}'
			);
			?>
		</p>

		<p>
			<?php
			printf( /* translators: %1$s - service name. */
				esc_html__( 'This is a reminder about your upcoming %1$s appointment.', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{service_name}'
			);
			?>
		</p>

		<p><strong>
				<?php esc_html_e( 'Appointment Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - service name. */
					esc_html__( 'Service: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{service_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - start date; %2$s - start time; %3$s - end time. */
					esc_html__( 'Date & time: %1$s, %2$s - %3$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{start_date}',
					'{start_time}',
					'{end_time}'
				);
				?>
			</li>

			{location_name}
		</ul>

		<p><strong>
				<?php esc_html_e( 'Order Summary', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<p>{order_summary_breakdown}</p>

		<hr style="border: none; border-top: 1px solid #ddd; margin: 20px 0;">
		<p style="font-size: 12px; color: #666;">
			<?php esc_html_e( 'If you need to cancel this appointment, please use the link below:', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			<a href="{cancellation_url}" style="color: #dc3232;"><?php esc_html_e( 'Cancel Appointment', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?></a>
		</p>
		<?php

		return ob_get_clean();
	}

	/**
	 * Get the default appointment reminder email content for employee.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	private static function get_appointment_reminder_employee_content() {

		ob_start();
		?>

		<p>
			<?php
			printf( /* translators: %1$s - employee full name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{employee_full_name}'
			);
			?>
		</p>

		<p>
			<?php
			printf( /* translators: %1$s - customer full name. */
				esc_html__( 'This is a reminder about your upcoming appointment with %1$s.', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{customer_full_name}'
			);
			?>
		</p>

		<p><strong>
				<?php esc_html_e( 'Appointment Information', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - service name. */
					esc_html__( 'Service: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{service_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - start date; %2$s - start time; %3$s - end time. */
					esc_html__( 'Date & time: %1$s, %2$s - %3$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{start_date}',
					'{start_time}',
					'{end_time}'
				);
				?>
			</li>

			{location_name}
		</ul>

		<p><strong>
				<?php esc_html_e( 'Order Summary', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<p>{order_summary_breakdown}</p>

		<p>
			<a href="{appointment_admin_url}">
				<?php esc_html_e( 'View appointment', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</a>
		</p>
		<?php

		return ob_get_clean();
	}

	/**
	 * Get the default payment refund email content for attendee.
	 *
	 * @since 1.1.0
	 *
	 * @return string
	 */
	private static function get_payment_refund_attendee_content() {

		ob_start();
		?>

		<p>
			<?php
			printf( /* translators: %1$s - customer full name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{customer_full_name}'
			);
			?>
		</p>

		<p>
			<?php
			printf( /* translators: %1$s - service name. */
				esc_html__( 'Your payment for %1$s has been refunded. You should see it back in your account soon — usually within 5 business days.', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{service_name}'
			);
			?>
		</p>

		<p><strong>
				<?php esc_html_e( 'Refund Details', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
			</strong></p>

		<ul>
			<li>
				<?php
				printf( /* translators: %1$s - service name. */
					esc_html__( 'Service: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{service_name}'
				);
				?>
			</li>

			<li>
				<?php
				printf( /* translators: %1$s - start date; %2$s - start time; %3$s - end time. */
					esc_html__( 'Date & time: %1$s, %2$s - %3$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'{start_date}',
					'{start_time}',
					'{end_time}'
				);
				?>
			</li>

		<li>
			<?php
			printf( /* translators: %1$s - refunded amount with currency. */
				esc_html__( 'Refunded Amount: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{refund_amount}'
			);
			?>
		</li>

		<li>
			<?php
			printf( /* translators: %1$s - payment gateway name. */
				esc_html__( 'Payment Method: %1$s', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{payment_gateway}'
			);
			?>
		</li>
	</ul>

	<?php

	return ob_get_clean();
}

	/**
	 * Get the default credit usage alert email to admin.
	 *
	 * @since 1.4.0
	 *
	 * @return array<string, mixed>
	 */
	public static function get_credit_usage_alert_admin() {

		return [
			'enabled' => true,
			/* translators: {site_name} - site name; {percentage} - percentage of credits used. */
			'subject' => esc_html__( '{site_name}: {percentage}% of integration credits used', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
			'content' => self::get_credit_usage_alert_admin_content(),
		];
	}

	/**
	 * Get the default credit usage alert email content for admin.
	 *
	 * @since 1.4.0
	 *
	 * @return string
	 */
	private static function get_credit_usage_alert_admin_content() {

		ob_start();
		?>

		<p style="margin: 0 0 15px; font-size: 16px; line-height: 24px; color: #2c3338;">
			<?php
			printf( /* translators: %1$s - recipient display name. */
				esc_html__( 'Hi %1$s,', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{admin_display_name}'
			);
			?>
		</p>

		<p style="margin: 0 0 15px; font-size: 16px; line-height: 24px; color: #2c3338;">
			<?php
			printf( /* translators: %1$s - credits used; %2$s - total credits; %3$s - site name. */
				esc_html__( 'You\'ve used %1$s of %2$s Sugar Calendar Bookings integration credits on %3$s.', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
				'{used}',
				'{total}',
				'{site_name}'
			);
			?>
		</p>

		<p style="margin: 0 0 15px; font-size: 16px; line-height: 24px; color: #2c3338;">
			<?php
			echo wp_kses(
				sprintf(
					/* translators: %1$s - link to the License & Usage settings page. */
					__( 'You can review your usage details on the %1$s.', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'<a href="{license_usage_url}" style="color: #ff8845; text-decoration: underline;">' . esc_html__( 'License & Usage page', 'sugar-calendar-bookings-scheduling-appointments-lite' ) . '</a>'
				),
				[
					'a' => [
						'href'  => [],
						'style' => [],
					],
				]
			);
			?>
		</p>

		<p style="margin: 0; font-size: 16px; line-height: 24px; color: #2c3338;">{credits_context}</p>

		<table border="0" cellspacing="0" cellpadding="0" style="margin: 30px 0 10px;">
			<tr>
				<td bgcolor="#ff8845" style="background-color: #ff8845; border-radius: 4px; padding: 14px 28px;">
					<a href="{upgrade_url}" style="color: #ffffff; font-weight: bold; font-size: 14px; line-height: 1; text-decoration: none;">
						<?php esc_html_e( 'Upgrade your plan', 'sugar-calendar-bookings-scheduling-appointments-lite' ); ?>
					</a>
				</td>
			</tr>
		</table>

		<?php

		return ob_get_clean();
	}

	/**
	 * Get the default from email address.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	public static function get_from_email() {

		return get_option( 'admin_email' );
	}

	/**
	 * Get the default from email name.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	public static function get_from_name() {

		return get_bloginfo( 'name' );
	}

	/**
	 * Get all email defaults as an array.
	 *
	 * @since 1.0.0
	 *
	 * @return array<string, mixed>
	 */
	public static function to_array() {

		return [
			'from_email'                    => self::get_from_email(),
			'from_name'                     => self::get_from_name(),
			'booking_confirmation_attendee' => self::get_booking_confirmation_attendee(),
			'booking_confirmation_employee' => self::get_booking_confirmation_employee(),
			'booking_pending_attendee'      => self::get_booking_pending_attendee(),
			'booking_pending_employee'      => self::get_booking_pending_employee(),
			'booking_update_attendee'       => self::get_booking_update_attendee(),
			'booking_update_employee'       => self::get_booking_update_employee(),
			'booking_cancellation_attendee' => self::get_booking_cancellation_attendee(),
			'booking_cancellation_employee' => self::get_booking_cancellation_employee(),
			'appointment_reminder_attendee' => self::get_appointment_reminder_attendee(),
			'appointment_reminder_employee' => self::get_appointment_reminder_employee(),
			'payment_refund_attendee'       => self::get_payment_refund_attendee(),
			// Intentionally not listed in EmailService::get_email_notifications() —
			// programmatic-only admin email. Kept here so get_email_template() falls back correctly.
			'credit_usage_alert_admin'      => self::get_credit_usage_alert_admin(),
		];
	}
}
