<!-- Footer -->
<footer>
	<div class="section-wrapper">
		<div class="footer-widget">
			<div class="int-widget">
                    <div class="footer-logo"><img src="https://mietubl-dev.oss.mietubl.com.cn/static/tpl/screenprotector/images/logo.svg" alt="Mietubl logo"></div>
				<div class="footer-int-text" mtb_edit="1">
				Mietubl, originated from Made in China, growing up with intellectually manufactured in China. Focus on product intelligence, resource integration in all aspects of product circulation, construction of ecological chain.
				</div>
				<div class="social">
					<ul>
						<li><a href="{{ site.dist.facebook }}" target="_blank"><img src="{{ site.asset_base_url}}static/tpl/screenprotector/images/facebook.svg" alt="Facebook"></a></li>
						<li><a href="{{ site.dist.tiktok }}" target="_blank"><img src="{{ site.asset_base_url}}static/tpl/screenprotector/images/TikTok.svg" alt="TikTok"></a></li>
						<li><a href="{{ site.dist.youtube }}" target="_blank"><img src="{{ site.asset_base_url}}static/tpl/screenprotector/images/youtube.svg" alt="Youtube"></a></li>
						<li><a href="{{ site.dist.instagram }}" target="_blank"><img src="{{ site.asset_base_url}}static/tpl/screenprotector/images/instagram.svg" alt="Instagram"></a></li>
					</ul>
				</div>
			</div>
			<div class="list-widget">
                {% for menu in site.menus_footer %}
                {% if menu.show %}
                            <dl class="">
                                <dt>{{ menu.title }}</dt>
                                {% for child in menu.children %}
                                    {% if child.show %}
                                        <dd>
                                            <a href="{{ child.uri }}" title="{{ child.title }}">
                                                {{ child.title }}
                                            </a>
                                        </dd>
                                    {% endif %}
                                {% endfor %}
                            </dl>

                {% endif %}
                {% endfor %}
			</div>
			<div class="contact-widget">
					<div class="widget-title" mtb_edit="1">Contact us</div>
					<div class="tel">{{ site.dist.service_hotline }}</div>
					<div class="mail"><a href="mailto:{{ site.dist.dist_email }}">{{ site.dist.dist_email }}</a></div>
					<div class="address"><a href="mailto:{{ site.dist.dist_email }}">{{ site.dist.company_address }}</a></div>
			</div>
		</div>
	</div>
</footer>

<script>
    document.getElementById('send_button').addEventListener('click', function() {
        const form = document.getElementById('form_contact');
        const actionUrl = form.getAttribute('data-action');

        // Create a FormData object from the form
        const formData = new FormData(form);

        // Perform the AJAX request
        fetch(actionUrl, {
            method: 'POST',
            body: formData,
            headers: {
                'Accept': 'application/json',
            },
        })
            .then(response => {
                if (response.ok) {
                    return response.json();
                } else {
                    throw new Error('Error in the request');
                }
            })
            .then(data => {
                console.log('Success:', data);
                alert('Message submitted successfully!');
            })
            .catch(error => {
                console.error('Error:', error);
                alert('There was an error submitting the Message.');
            });
    });
</script>
{{ site.dist.statistics_js | raw }}
<!-- footer end -->