<?php $__env->startSection('css'); ?>
    <link href="<?php echo e(asset('assets/web/css/lib/image-uploader.min.css')); ?>" rel="stylesheet" type="text/css">
    <link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">

<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <section class="inner_header">
        <img src="<?php echo e(asset('assets/web/images/icons/inner.svg')); ?>" alt="" class="inner_shap">
        <div class="container">
            <ul class="links">
                <li>
                    <a href="<?php echo e(LaravelLocalization::getLocalizedURL($lang, route('home'), [], true)); ?>"><?php echo e(__('main.home')); ?></a>
                </li>
                <li>
                    <a href="#"> <?php echo e(__('caseRequests.case_request')); ?> </a>
                </li>
            </ul>
            <h4><?php echo e(__('caseRequests.case_request')); ?></h4>
        </div>
    </section>

    <section class="consultation-pg section_padding">
        <div class="container">
            <div class="form-container">
                <form method="post" action="<?php echo e(route('cases.caseRequest')); ?>" class="case_request_form">
                    <div class="doc-wrapper">
                        <div class="row justify-content-center">
                            <div class="col-md-4">
                                <div class="form-check">
                                    <input class="form-check-input" type="radio" name="request_type" id="case_study" value="case_study">
                                    <label class="form-check-label color2" for="case_study">
                                        <div class="icon-outer">
                                            <img src="<?php echo e(asset('assets/web/images/icons/law-1.svg')); ?>" alt="" class="icon"/>
                                        </div>
                                        <h6 class="title mb-0"><?php echo e(__('caseRequests.case_study')); ?></h6>
                                    </label>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-check">
                                    <input class="form-check-input" type="radio" name="request_type" id="drafting_contracts" value="drafting_contracts">
                                    <label class="form-check-label color1" for="drafting_contracts">
                                        <div class="icon-outer">
                                            <img src="<?php echo e(asset('assets/web/images/icons/law-1.svg')); ?>" alt="" class="icon"/>
                                        </div>
                                        <h6 class="title mb-0"><?php echo e(__('caseRequests.drafting_contracts')); ?></h6>
                                    </label>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-check">
                                    <input class="form-check-input" type="radio" name="request_type" id="case_study_attending" value="case_study_attending">
                                    <label class="form-check-label color2" for="case_study_attending">
                                        <div class="icon-outer">
                                            <img src="<?php echo e(asset('assets/web/images/icons/law-1.svg')); ?>" alt="" class="icon"/>
                                        </div>
                                        <h6 class="title mb-0"><?php echo e(__('caseRequests.case_study_attending')); ?> </h6>
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row justify-content-between mt-5 pt-3">
                        <div class="col-md-6">
                            <h5 class="title text-dark mb-4"><b><?php echo e(__('caseRequests.subject')); ?></b></h5>
                            <div class="form-group">
                                <input name="subject" class="form-control" placeholder="<?php echo e(__('caseRequests.subject')); ?>"/>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <h5 class="title text-dark mb-4"><b><?php echo e(__('caseRequests.requests')); ?></b></h5>
                            <div class="form-group">
                                <input name="requests" class="form-control" placeholder="<?php echo e(__('caseRequests.requests')); ?>"/>
                            </div>
                        </div>
                    </div>
                    <div class="row mt-5 pt-3">
                        <div class="col-md-6">
                            <h5 class="title text-dark mb-4"><b><?php echo e(__('caseRequests.details')); ?></b></h5>
                            <textarea name="details" class="form-control" rows="12"></textarea>
                        </div>
                        <div class="col-md-6">
                            <h5 class="title text-dark mb-4"><b><?php echo e(__('caseRequests.files')); ?></b></h5>
                            <div class="input-images"></div>

                        </div>
                    </div>
                    <button class="submit-butn butn mt-5 m-auto d-block case_request_button" type="button"><span><b><?php echo e(__('caseRequests.send_case')); ?> </b></span></button>
                </form>
            </div>
        </div>
    </section>

    <div class="modal confirmConsult case_confirmation_modal fade" id="confirmConsult" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered modal-lg">
            <div class="modal-content">
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                <div class="modal-body">
                    <img src="<?php echo e(asset('assets/web/images/icons/confirm.png')); ?>" alt="" class="icon"/>
                    <div class="content text-center mt-4">
                        <h3 class="title text-dark mb-2"><b><?php echo e(__('caseRequests.case_send_successfully')); ?></b></h3>
                        <p class="text">
                            <?php echo e(__('caseRequests.case_hint')); ?>

                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('inner_js'); ?>
    <script src="<?php echo e(asset('assets/web/js/lib/image-uploader.min.js')); ?>"></script>

    <script>
        let uploadAttachments = "<?php echo e(__('caseRequests.upload_attachments')); ?>";
        $('.case_request_button').click(async function (e) {
            e.preventDefault();
            $(this).attr('disabled', true);
            let form = $('.case_request_form'),
                data = new FormData(form[0]),
                url = form.attr('action'),
                method = form.attr('method');

            const response=await ajax({
                url,
                data,
                dataType: 'json',
                method,
                contentType: false,
                processData: false,
            });

            if (response.errors) {
                $(this).attr('disabled', false);
                toasterError(response.errors);
            }
            if (response.success) {
                let myModal = new bootstrap.Modal(document.querySelector('.case_confirmation_modal'));

                myModal.show();
            }
        });

        $('.case_confirmation_modal').on('hide.bs.modal', function () {
            window.location.reload();
        });

        $('.input-images').imageUploader({
            label: uploadAttachments,
            imagesInputName: 'files'
        });

    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('web.layouts.container', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\wamp64\www\legal\resources\views/web/cases/case_request.blade.php ENDPATH**/ ?>