<footer class="footer">
    <div class="container footer-inner">
        <div class="assist-block footer-block">
            <div class="footer-title-wrapper active">
                <h2 class="footer-title">{{__('shop::app.footer.help')}}</h2>
                <div class="footer-title-arrow">
                    <img src="{{ bagisto_asset ('icons/arrow-downside.svg') }}" alt="arrow">
                </div>
            </div>

            <div class="hr-lines">
                <div class="bright-line"></div>
                <div class="dim-line"></div>
            </div>
            <div class="assist-block-content footer-content visible">
                {!! DbView::make(core()->getCurrentChannel())->field('footer_content')->render() !!}
            </div>
        </div>
        <div class="contacts-block footer-block">
            <div class="footer-title-wrapper">
                <h2 class="footer-title">{{__('shop::app.footer.contacts')}}</h2>
                <div class="footer-title-arrow">
                    <img src="{{ bagisto_asset ('icons/arrow-downside.svg') }}" alt="arrow">
                </div>
            </div>

            <div class="hr-lines">
                <div class="bright-line"></div>
                <div class="dim-line"></div>
            </div>
            <div class="contacts-block-content footer-content">
                <div class="contacts-block-address">
                    <span class="contacts-block-dim-text">{{__('shop::app.footer.address')}}</span>
                    <p class="contacts-block-bright-text">{{core()->getConfigData('general.general.info.address')}}</p>
                </div>
                <div class="contacts-block-address">
                    <span class="contacts-block-dim-text phone-number">{{__('shop::app.footer.mobile')}}</span>
                    <p class="contacts-block-bright-text">{{core()->getConfigData('general.general.info.phone')}}</p>
                </div>
                <div class="contacts-block-number">
                    <span class="contacts-block-dim-text">{{__('shop::app.checkout.onepage.email')}} : </span>
                    <a href="mailto: contact1@tehnikadunyasi.com" class="contacts-block-bright-text" data-address="{{str_replace("@","#",core()->getConfigData('emails.configure.email_settings.shop_email_from'))}}">contact1@tehnikadunyasi.com</a>
                </div>
            </div>
        </div>
        <div class="soon-block footer-block">
            <div class="footer-title-wrapper">
                <h2 class="footer-title">{{__('shop::app.footer.apps')}}</h2>
                <div class="footer-title-arrow">
                    <img src="{{ bagisto_asset ('icons/arrow-downside.svg') }}" alt="arrow">
                </div>
            </div>

            <div class="hr-lines">
                <div class="bright-line"></div>
                <div class="dim-line"></div>
            </div>
            <div class="soon-block-content footer-content">
                <div class="soon-download">
                    <div class="download-icon">
                        <img src="{{ bagisto_asset ('icons/apple.svg') }}" alt="appstore">
                    </div>
                    <div class="download-text">
                        <span class="download-text-dim">Download on the</span>
                        <a href="{{core()->getConfigData('general.general.info.appstore')}}" class="download-text-bright">App Store</a>
                    </div>
                </div>
                <div class="soon-download">
                    <div class="download-icon">
                        <img src="{{ bagisto_asset ('icons/google-play.svg') }}" alt="googleplay">
                    </div>
                    <div class="download-text">
                        <span class="download-text-dim">Download on the</span>
                        <a class="download-text-bright" href="{{core()->getConfigData('general.general.info.playmarket')}}">Google Play</a>
                    </div>
                </div>
            </div>
        </div>
        <div class="social-block footer-block">
            <div class="footer-title-wrapper">
                <h2 class="footer-title">{{__('shop::app.footer.social')}}</h2>
                <div class="footer-title-arrow">
                    <img src="{{ bagisto_asset ('icons/arrow-downside.svg') }}" alt="arrow">
                </div>
            </div>

            <div class="hr-lines">
                <div class="bright-line"></div>
                <div class="dim-line"></div>
            </div>
            <div class="social-block-content footer-content">
                <div class="social-block-content-wrapper">
                    <a href="{{core()->getConfigData('general.general.info.facebook')}}" class="social-facebook social-icon">
                        <img src="{{ bagisto_asset ('icons/facebook.svg') }}" alt="facebook">
                    </a>
                    <a href="{{core()->getConfigData('general.general.info.twitter')}}" class="social-twitter social-icon">
                        <img src="{{ bagisto_asset ('icons/twitter.svg') }}" alt="twitter">
                    </a>
                    <a href="{{core()->getConfigData('general.general.info.instagram')}}" class="social-instagram social-icon">
                        <img src="{{ bagisto_asset ('icons/instagram.svg') }}" alt="instagram">
                    </a>
                    <a href="{{core()->getConfigData('general.general.info.googleplus')}}" class="social-google social-icon">
                        <img src="{{ bagisto_asset ('icons/google-plus.svg') }}" alt="google-plus">
                    </a>
                </div>

            </div>
        </div>
    </div>
    <div class="hr-line"></div>
    @if (core()->getConfigData('general.content.footer.footer_toggle'))
        <div class="footer-bottom container footer-bottom-inner">
            <span class="footer-bottom-text">
                @if (core()->getConfigData('general.content.footer.footer_content'))
                    {!! core()->getConfigData('general.content.footer.footer_content') !!}
                @else
                    {!! trans('admin::app.footer.copy-right') !!}
                @endif
            </span>
        </div>
    @endif
</footer>
@push('scripts')
<script type="text/javascript">
    const handleMailTo = (address) => {
        address.replace('#', '@');
        window.open(`mailto:${address}`, '_blank');
    };

    const mailSrc = document.querySelector(
        '.contacts-block-number a.contacts-block-bright-text'
    );
    mailSrc.addEventListener(
        'click',
        ()=> handleMailTo(mailSrc.getAttribute('data-address'))
    );
</script>
@endpush