<?php $_helper = $this->helper('FiloBlu\Storelocator\Helper\Data'); ?>

<?php if (
            $_helper->getConfig('filoblu_storelocator_section/search/gmaps_search_country_enabled') || 
            $_helper->getConfig('filoblu_storelocator_section/search/gmaps_search_autocomplete_enabled')
        ): ?>

    <div class="filoblu-storelocator-buttons">
        <?php if ($_helper->getConfig('filoblu_storelocator_section/search/gmaps_search_country_enabled')): ?>
            <div class="control gmapCountry-container">
                <label for="gmapCountry"><?php echo __('Select Country'); ?></label>
                <select class="select"
                        name="gmapCountry"
                        id="gmapCountry"
                        data-placeholder="<?php echo __('Select a country...'); ?>">

                </select>
            </div>
        <?php endif; ?>


        <?php if ($_helper->getConfig('filoblu_storelocator_section/search/gmaps_search_country_enabled') &&
                  $_helper->getConfig('filoblu_storelocator_section/search/gmaps_search_region_enabled')): ?>
            <div class="control gmapRegion-container">
                <label for="gmapRegion"><?php echo __('Select Region'); ?></label>
                <select class="select"
                        name="gmapRegion"
                        id="gmapRegion"
                        data-placeholder="<?php echo __('Select a region...'); ?>"
                        disabled>

                </select>
            </div>
        <?php endif; ?>

        <?php if (
                    $_helper->getConfig('filoblu_storelocator_section/search/gmaps_search_country_enabled') &&
                    $_helper->getConfig('filoblu_storelocator_section/search/gmaps_search_city_enabled')
                ): ?>
            <div class="control gmapCity-container">
                <label for="gmapCity"><?php echo __('Select City'); ?></label>
                <select class="select"
                        name="gmapCity"
                        id="gmapCity"
                        data-placeholder="<?php echo __('Select a city...'); ?>"
                        disabled >

                </select>
            </div>
        <?php endif; ?>

        <?php if ($_helper->getConfig('filoblu_storelocator_section/search/gmaps_search_autocomplete_enabled')): ?>
            <div class="control gmapSearch-container">
                <div class="gmapSearch-container-input">
                    <label for="gmapSearch"><?php echo __('Filter by location'); ?></label>
                    <input id="gmapSearch"
                           type="text"
                           name="gmapSearch"
                           value=""
                           placeholder="<?php echo __('Enter a city and state, an address or ZIP code'); ?>"
                           class="input-text"
                           maxlength=""
                           />
                </div>
            </div>
        <?php endif; ?>

        <?php if ($_helper->getConfig('filoblu_storelocator_section/search/gmaps_search_tag_enabled')): ?>
            <div class="gmapTags-container">
                <label class="tag-label" for="gmapSearch"><?php echo __('Filter by tags'); ?></label>
                <?php foreach ($this->getAllAvailableTags() as $tag): ?>
                    <div class="tag-info" data-tag-id="<?php echo $tag->getTagId() ?>">
                        <?php if ($tag->getImageUrl()): ?>
                            <div class="tag-image">
                                <img src="<?php echo $tag->getImageUrl(); ?>" title="<?php echo strip_tags($tag->getDescription()); ?>" alt="<?php echo $tag->getName(); ?>" />
                            </div>
                        <?php endif; ?>
                        <div class="tag-name">
                            <?php echo $tag->getName(); ?>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>
        <?php endif; ?>
    </div>
<?php endif; ?>