<?php

use TourOperatorPro\Factory;
use TourOperatorPro\Html\TourOperatorProHtmlWooPanel;
use TourOperatorPro\Language\Text;
use TourOperatorPro\Utilities\Utility;
defined('_TOUROPERATOR_EXEC') or die;
extract($displayData);

TourOperatorProHtmlWooPanel::load_jquery_library('tooltip');


TourOperatorProHtmlWooPanel::load_jquery_library('increment');
$id_by_name = "element_field_". $name;
?>
    <div id="<?php echo (esc_attr($id_by_name)) ?>" class="field-map">
        <div class="row">
            <div class="col-md-12">
                <div id="simplegmaps-<?php echo (esc_attr($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 echo (esc_attr($name)); ?>"></button>
                <input type="hidden" name="<?php echo (esc_attr($field_published)); ?>" value="1">
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <p>You have coodinate?</p>
                <div class="coodinate-<?php echo (esc_attr($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_woopanel/app/layouts/WooBooking/form/field/map/map.jquery.js');