<footer class="footer">
    <div class="topFooter">
        <div class="container">
            <div class="row">
                <div class="col-md-4">
                    <div class="ftInfoBlock">
                        <div class="logoFt"><a href="#!"><img style="width: 19rem;" src="{{ asset('frontend/images/logoFt.png') }}"
                                    alt="logo"></a></div>
                        <div class="contactInfo d-flex">
                            <i class="far fa-envelope"></i>
                            <div class="contactInfoRight">
                                <span>Email</span>
                                <a href="#!">{{config('GET.admin_email')}}</a>
                            </div>
                        </div>
                        <div class="contactInfo d-flex">
                            <i class="fas fa-phone"></i>
                            <div class="contactInfoRight">
                                <span>Phone</span>
                                <a href="#!">{{config('GET.telephone')}}</a>
                            </div>
                        </div>
                        <div class="socialInfo d-flex">

                            <div class="contactInfoRight">
                                <span>Social Media</span>
                                <ul class="socialLinks text-center d-flex justify-content-center">
                                    <li><a href="{{config('GET.facebook_url')}}"><i class="fab fa-facebook-f"></i></a></li>
                                    <li><a href="{{config('GET.twitter_url')}}"><i class="x-twitter"><img
                                                    src="{{ asset('frontend/images/twitter-subscribe.png') }}"
                                                    alt="twitter-subscribe"></i></a></li>
                                    <li><a href="{{config('GET.google_url')}}"><i class="fab fa-google-plus-g"></i></a></li>
                                    <li><a href="{{config('GET.linkedin_url')}}"><i class="fab fa-linkedin-in"></i></a></li>
                                    <li><a href="{{config('GET.youtube_url')}}"><i class="fab fa-youtube"></i></a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="ftNav">
                        <span class="ftNavHeading">Quick Links</span>
                        <ul>
                            <li><a href="{{route('home')}}">Home</a></li>
                            <li><a href="{{route('static.pages','about-us')}}">About us</a></li>
                            <li><a href="{{route('static.pages','reach-us')}}">Reach us</a></li>
                            {{-- <li><a href="{{route('')}}">F&Q</a></li> --}}
                        </ul>
                    </div>
                </div>



@php
            $serviceCategories = \App\Models\ServiceCategory::where('status',1)->limit(7)->get();
            $jobCategories =     \App\Models\Category::where('status',1)->limit(7)->get();
@endphp
@if((auth()->guard('user')->check() && auth()->guard('user')->user()->role!=3) || !auth()->guard('user')->check())
@php

$categories = $serviceCategories;
@endphp
@else
@php
$categories = $jobCategories
@endphp
@endif



                <div class="col-md-5">
                    <div class="ftNav">
                        <span class="ftNavHeading">{{(auth()->guard('user')->check() && auth()->guard('user')->user()->role!=3) || !auth()->guard('user')->check()? "Services":"Jobs" }}</span>
                        <div class="navTwo d-md-flex">

                            <ul>
                                @foreach ($serviceCategories as $category)
                                <li><a href="{{route('employer.service.list').'?category_id='.$category->id}}">{{$category->title}}</a></li>
                                @endforeach
                            </ul>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="bottomFooter">
        <div class="container">
            <div class="row">
                <div class="col-md-6">
                    <ul class="privacyNav d-flex">
                        <li><a href="{{route('static.pages','terms-condition')}}">Terms & Conditions</a></li>
                        <li><a href="{{route('static.pages','privacy-policy')}}">Privacy Policy</a></li>
                    </ul>
                </div>

                <div class="col-md-6 text-right">
                    <span class="reserved">© 2024 <a href="{{route('home')}}">SurplusHR.com.</a> All rights
                        reserved</span>
                </div>
            </div>
        </div>
    </div>
</footer>


    {{-- end --}}
<!-- Include jQuery (if not already included) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="{{ asset('frontend/js/jquery-3.5.1.min.js') }}"></script>
<script src="{{ asset('frontend/js/select2.min.js') }}"></script>
<script src="{{ asset('frontend/js/popper.min.js') }}"></script>
<script src="{{ asset('frontend/js/bootstrap.min.js') }}"></script>
<script src="{{ asset('frontend/js/iphone-menu.js') }}"></script>
<script src="{{ asset('frontend/js/owl.carousel-min.js') }}"></script>
<script src="{{ asset('frontend/js/custom.js') }}"></script>
{{-- <script src="{{asset('frontend/js/ckeditornew.js')}}"></script> --}}
<script src="https://cdn.ckeditor.com/4.22.1/standard/ckeditor.js"></script>
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.3/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>


<script>
  function uploadProfileImage() {
        $('#profileupload').click();
    }
    $(document).ready(function() {
        $('.location').select2();
        // $('.search-services').select2();
    });
    document.addEventListener("DOMContentLoaded", function() {
        const inputs = document.querySelectorAll('input');
        inputs.forEach(input => {
            input.addEventListener('input', function() {
                // Trim leading spaces
                this.value = this.value.replace(/^\s+/, '');
            });
        });
    });

    function profileImageUpload(input) {
    const file = input.files[0]; // Access the file
    const route = input.getAttribute('upload-route');

    if (file) {
        let name = input.value;
        // let _token = '{{ csrf_token() }}';
        let _token = $('meta[name="csrf-token"]').attr('content');

        const reader = new FileReader();

        // Show the image preview
        reader.onload = function(e) {
            $('#profileImgDisplay').attr('src', e.target.result);
        };
        reader.readAsDataURL(file);

        // Prepare the file for upload
        const formData = new FormData();
        formData.append('profile', file);

        // AJAX request to upload the file
        $.ajax({
            url: route, // Correct server endpoint
            type: 'POST',
            data: formData,
            contentType: 'multipart/form-data',
            contentType: false,
            processData: false,
            headers: {
                'X-CSRF-TOKEN': _token
            },
            success: (response) => {
                // success
                console.log(response);
            },
            error: (response) => {
                console.log('error',response);
            }
        });
    } else {
        alert('No file selected.'); // Alert if no file is selected
    }
}



</script>
@stack('front-script')
