<?php
/**
 * Template #1
 *
 * @package WordPress
 * @subpackage GiveASAP
 * @since GiveASAP 1.0
 */

$gallery_images = $display["images"];

giveasap_show_logo( $display );

?>

<div class="giveasap_box">
    <?php
        do_action( 'sg_box_header', $giveaway, $giveasap_front );

	if( $giveasap_ended ) {
		giveasap_show_ended_alert();
	} elseif ( $giveaway_started ) {
		?>
        <div id="countdown" data-timezone="<?php echo $timezone; ?>" data-end="<?php echo giveasap_get_end_time( $giveaway->get_id() ); ?>" class="giveasap_countdown"></div>
	<?php } else {
	    $start = $ga_schedule->get_start_timestamp();
	    ?>
        <p class="giveasap-center"><?php esc_html_e( 'Starts in:', 'giveasap' ); ?></p>
        <div id="countdown" data-timezone="<?php echo $timezone; ?>" data-end="<?php echo $start; ?>" class="giveasap_countdown"></div>
		<?php
    }

    ?>

    <?php sg_show_meta_info( $prize ) ?>

	<?php the_giveasap_gallery( $gallery_images ); ?>

	<?php if( ! $giveasap_ended ) { ?>

		<?php giveasap_the_form( $giveasap_front, $giveasap_settings ); ?>

	<?php } else {
		giveasap_show_winners();
    }

    ?>

    <?php
        do_action( 'sg_box_footer', $giveaway, $giveasap_front, $giveasap_settings );
    ?>

</div>