<?php
/**
 * The template for displaying the footer
 *
 * Contains the closing of the #content div and all content after.
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package USG
 */

?>

<?php wp_footer(); 
$custom_logo_id = get_theme_mod('custom_logo');
$logo = wp_get_attachment_image_src($custom_logo_id, 'full');?>
<main id="footer">
    <footer>
        <div class="footer__head">
            <div class="logo">
                <a href="<?=home_url() ?>"><?php
    				if (has_custom_logo()) {
    					echo '<img class="header-logo__image" src="' . esc_url($logo[0]) . '" alt="' . get_bloginfo('name') . '">';
    				}
                ?>AMC Diagnostyka<?php //echo get_bloginfo('name'); ?></a>
            </div>
            <div class="divider"></div>
            <div class="footer__small-title">
                <a id="small-title__footer" href="<?=home_url() ?>">Profesjonalne Centrum USG</a>
            </div>
        </div>

        <div class="footer__basement">
            <!-- <a href="/polityka-prywatnosci/">Polityka prywatności i plików Cookie</a>
            <a href="/regulamin/">Regulamin</a> -->
            <?php
                wp_nav_menu( array(
                    'theme_location' => 'footer-1',
                    'walker'         => new Custom_Footer_Walker(),
                    'items_wrap'     => '%3$s',
                    'container'      => false,
                ) );
            ?>

        </div>
    </footer>
</main>
<script>
document.addEventListener('DOMContentLoaded', function() {
    const targetButton = document.querySelector('.submit-btn-wrapper button');
    if (targetButton) {
        targetButton.addEventListener('click', function() {
            gtag('event', 'conversion', {
                'send_to': 'AW-16738496991/aCbQCLizleIZEN_jxK0-',
                'value': 5.0,
                'currency': 'PLN'
            });
        });
    }
});
</script>
</body>
</html>
