@php
    $footerContent = json_decode(
        \App\Models\LandingPage::where('locale', app()->getLocale())
            ->where('status', true)
            ->where('theme', site_theme())
            ->where('code', 'footer')
            ->first()?->data,
        true,
    );
@endphp

@if ($footerContent !== null)
    <!-- footer section start -->
    <footer class="td-footer">
        <div class="container">
            <div class="td-footer-wrapper wow img-custom-anim-top" data-wow-duration="1.5s" data-wow-delay="0.2s">
                <div class="row g-4">
                    <div class="col-lg-6 td-footer-left">
                        <a href="{{ route('home') }}" class="td-footer-logo">
                            <img src="{{ asset(setting('site_logo')) }}" alt="">
                        </a>
                        <div class="td-footer-content">
                            <p>{{ $footerContent['newsletter_title'] }}</p>
                            <form action="{{ route('subscriber') }}" method="post">
                                @csrf
                                <div class="td-footer-content-inputs">
                                    <input type="text" name="email" placeholder="Enter your email">
                                    <button class="td-btn">
                                        <span class="td-btn-wrap">
                                            <span class="td-btn-y-1">{{ __('Subscribe') }}</span>
                                            <span class="td-btn-y-2">{{ __('Subscribe') }}</span>
                                        </span>
                                        <i></i>
                                    </button>
                                </div>
                            </form>
                            <p>{{ $footerContent['newsletter_sub_title'] }}</p>
                        </div>
                    </div>
                    <div class="col-lg-6 td-footer-right">
                        <div class="row g-4">
                            <div class="col-6 col-sm-4 td-footer-links">
                                <h3>{{ $footerContent['widget_first_title'] }}</h3>
                                <ul>
                                    @foreach ($widget_one_menus as $navigation)
                                        <li>
                                            <a href="{{ $navigation->url }}">{{ $navigation->name }}</a>
                                        </li>
                                    @endforeach
                                </ul>
                            </div>
                            <div class="col-6 col-sm-4 td-footer-links">
                                <h3>{{ $footerContent['widget_second_title'] }}</h3>
                                <ul>
                                    @foreach ($widget_two_menus as $navigation)
                                        <li>
                                            <a href="{{ $navigation->url }}">{{ $navigation->name }}</a>

                                        </li>
                                    @endforeach
                                </ul>
                            </div>
                            <div class="col-6 col-sm-4 td-footer-links">
                                <h3>{{ $footerContent['widget_third_title'] }}</h3>
                                <ul>
                                    @foreach ($socials as $social)
                                        <li>
                                            <a href="{{ url($social->url) }}">{{ $social->icon_name }}</a>
                                        </li>
                                    @endforeach
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="container">
            <div class="td-footer-copyright">
                <p>{{ $footerContent['copyright_text'] }}</p>
                <ul>
                    <li>
                        <a href="{{ url('/privacy-policy') }}">{{ __('Privacy Policy') }}</a>
                    </li>
                    <li>
                        <a href="{{ url('terms-and-conditions') }}">{{ __('Terms of Service') }}</a>
                    </li>
                </ul>
            </div>
        </div>
    </footer>
    <!-- footer section end -->
@endif
