<?php
/**
 * Education layout template.
 *
 * @since 1.2.0
 *
 * @var $scb_page AbstractEducationPage
 * @var $scb_screenshots array
 * @var $scb_description string
 * @var $scb_features array
 * @var $scb_features_heading string
 * @var $scb_utm_medium string
 */

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

use SugarCalendarBookings\Support\Helpers\UI;
use SugarCalendarBookings\Support\Helpers\Helpers;

?>
<div id="<?php echo esc_attr( $scb_page->get_wrapper_element_id() ); ?>" class="sugar-calendar-bookings-education">

	<div class="sugar-calendar-bookings-education-content">

		<div class="sugar-calendar-bookings-education-header">

			<h1 class="screen-reader-text"><?php echo esc_html( $scb_page::get_title() ); ?></h1>

			<h2 id="sugar-calendar-bookings-<?php echo esc_attr( $scb_page::get_slug() ); ?>-heading">
				<?php echo esc_html( $scb_page::get_title() ); ?>
				<?php UI::pro_badge( true ); ?>
			</h2>

			<p class="description">
				<?php echo esc_html( $scb_description ); ?>
			</p>

			<?php
				UI::button(
					[
						'text'   => esc_html__( 'Upgrade to Sugar Calendar Pro', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
						'class'  => 'sugar-calendar-bookings-education-header-buy-pro-btn',
						'size'   => 'lg',
						'link'   => esc_url(
							Helpers::get_utm_url(
								'https://sugarcalendar.com/pricing/bookings/',
								[
									'medium'  => $scb_utm_medium,
									'content' => $scb_page->get_utm_content( 'top' ),
								]
							)
						),
						'target' => '_blank',
					]
				);
			?>
		</div>

		<div class="sugar-calendar-bookings-education-preview">
			<?php $scb_page->render_screenshots(); ?>
			<?php UI::image_modal(); ?>
		</div>

		<div class="sugar-calendar-bookings-education-settings">

			<h4><?php echo esc_html( $scb_features_heading ); ?></h4>

			<?php $scb_page->render_features(); ?>
		</div>

		<?php
			UI::button(
				[
					'text'   => esc_html__( 'Upgrade to Sugar Calendar Pro', 'sugar-calendar-bookings-scheduling-appointments-lite' ),
					'size'   => 'lg',
					'link'   => esc_url(
						Helpers::get_utm_url(
							'https://sugarcalendar.com/pricing/bookings/',
							[
								'medium'  => $scb_utm_medium,
								'content' => $scb_page->get_utm_content( 'bottom' ),
							]
						)
					),
					'target' => '_blank',
				]
			);
		?>
	</div>
</div>
