<?php

use WpBookingPro\Factory;
use WpBookingPro\Html\WpBookingProHtmlBackend;
use WpBookingPro\Language\Text;
use WpBookingPro\Utilities\Utility;
defined('_WPBOOKINGPRO_EXEC') or die;
extract($displayData);

WpBookingProHtmlBackend::load_jquery_library('tooltip');


WpBookingProHtmlBackend::load_jquery_library('increment');
$id_by_name = "element_field_". $name;
?>
    <div id="<?php esc_attr_e($id_by_name) ?>" class="field-map">
        <div class="row">
            <div class="col-md-12">
                <div id="simplegmaps-<?php esc_attr_e($name); ?>" class="google-map simplegmaps-google">
                    <div class="map-marker" data-title="Remi" data-latlng="20.9436294,105.7960543"
                         data-address=""></div>
                </div>
                <button type="submit" style="display: none;" id="search-<?php esc_attr_e($name); ?>"></button>
                <input type="hidden" name="<?php esc_attr_e($field_published); ?>" value="1">
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <p>You have coodinate?</p>
                <div class="coodinate-<?php esc_attr_e($name); ?>" style="display: none;">
                    <div class="coodinate">
                        <label>Latitude:</label>
                        <input type="text" name="" value="">
                    </div>
                    <div class="coodinate">
                        <label>Longtitude:</label>
                        <input type="text" name="" value="">
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php
$doc = Factory::getDocument();
$doc->addScriptApplySelector('.field-map','field_map',array(
    "input_name"=>  $name,
    "listen_onchange_address_name"=>  $listen_onchange_address_name,
    "field_published"=>  $field_published,
    "eventButton"=>  $name,
),'admin/nb_apps/nb_woobooking/layouts/WooBooking/form/field/map/map.jquery.js');