<?php if(empty($tour_external) || $tour_external == 'off'){ ?>
<?php echo st()->load_template('layouts/elementor/common/loader'); ?>
    <div class="st-form-booking-action">
        <form id="form-booking-inpage" method="post" action="#booking-request" class="tour-booking-form form-has-guest-name">
            <div class="st-group-form">
                <input type="hidden" name="action" value="tours_add_to_cart">
                <input type="hidden" name="item_id" value="<?php echo get_the_ID(); ?>">
                <input type="hidden" name="type_tour"
                        value="<?php echo get_post_meta(get_the_ID(), 'type_tour', true) ?>">

                <div class="form-date-search search-form">
                    <?php echo stt_elementorv2()->loadView('services/tour/single/item/form-book/date'); ?>
                    <?php echo stt_elementorv2()->loadView('services/tour/single/item/form-book/guest'); ?>
                    <?php echo stt_elementorv2()->loadView('services/tour/single/item/form-book/package'); ?>

					<?php
					$enable_pickup = get_post_meta( get_the_ID(), 'enable_pickup', true );
					if ( $enable_pickup == 'on' ) :
						?>
						<div class="form-group form-pickup">
							<div class="pickup__item">
								<label for="pickup"><?php echo esc_html__( 'Pick up', 'traveler' ) ?></label>
								<input type="text" id="pickup" name="pickup">
							</div>
						</div>
					<?php endif; ?>
                </div>
                <?php echo stt_elementorv2()->loadView('services/common/single/guest-name'); ?>
            </div>

            <?php echo stt_elementorv2()->loadView('services/tour/single/item/form-book/extra'); ?>
            <div class="total-price-book d-flex justify-content-between align-items-center">

            </div>
            <div class="submit-group">
                <button class="text-center btn-v2 btn-primary btn-book-ajax"
                        type="submit"
                        name="submit"><?php echo esc_html__('Book now', 'traveler') ?><i class="fa fa-spinner fa-spin d-none"></i></button>
                <input style="display:none;" type="submit"
                        class="btn btn-default btn-send-message"
                        data-id="<?php echo get_the_ID(); ?>" name="st_send_message"
                        value="<?php echo __('Send message', 'traveler'); ?>">
            </div>
            <div class="message-wrapper mt30"></div>
			<div class="message-wrapper-2"></div>
        </form>
    </div>
    <?php } else {?>
    <div class="submit-group mb30">
        <a href="<?php echo esc_url($tour_external_link); ?>" class="btn btn-green btn-large btn-full upper"><?php echo esc_html__( 'Explore', 'traveler' ); ?></a>
    </div>
<?php }?>