<?php if (isset($component)) { $__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\MasterLayout::class, ['assets' => $assets ?? []]); ?>
<?php $component->withName('master-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
    <div>
        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-header1 d-flex justify-content-between mt-3 ml-3">
                        <div class="header-title">
                            <h4 class="card-title"><b><?php echo e($pageTitle); ?></b>
                            <span class="" data-bs-toggle="tooltip" title="<?php echo e(__('message.help_info')); ?>">
                                <i class="fas fa-info-circle fa-sm"></i>
                            </span>
                        </h4>
                                   
                        </div>
                        <div class="card-action mr-2 mb-2">
                            <a href="<?php echo e(route('help')); ?>" class="btn btn-sm loadRemoteModel mr-3 help" role="button"><?php echo e(__('message.help')); ?></a>
                            <a href="<?php echo e(route('download.template')); ?>" class="btn btn-sm mr-3 downloadtemplate loadRemoteModel" role="button"><i class="fas fa-file-download mr-2 "></i> <?php echo e(__('message.download_template')); ?></a>
                            
                        </div>                        
                    </div>
                    <div style="text-align: end">
                        <h5 class="mt-2 mr-3"><span class="font-weight-bold"><?php echo e(__('message.note')); ?></span>
                        <?php echo e(__('message.bulk_note')); ?>

                            </h5>
                    </div>
                <?php echo e(Form::open(['route' => 'import.languagewithkeyword', 'method' => 'post', 'enctype' => 'multipart/form-data', 'data-toggle' => 'validator' ])); ?>

                    <div class="card-body">
                        <div class="new-user-info">
                            <div class="row">
                                <div class="col-md-12">
                                    <input type="file" name="language_with_keyword" class="custom-file-input" id="customFile" accept=".csv" required="required">
                                </div>
                            </div>
                            <?php echo e(Form::submit( __('message.import'), ['class'=>'btn btn-md btn-primary float-right mt-2 mb-2'])); ?>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php echo Form::close(); ?>

    </div>
    <?php $__env->startSection('bottom_script'); ?>
    <script>
        var globalFunctions = {};

        globalFunctions.ddInput = function(elem) {
        if ($(elem).length == 0 || typeof FileReader === "undefined") return;
        var $fileupload = $('input[type="file"]');
        var noitems = '<li class="no-items"><?php echo e(__('message.drop_your_template_here')); ?><br><button class="blue-text"><?php echo e(__('message.browse_file')); ?></button></li>';
        var hasitems = '<div class="browse hasitems"><?php echo e(__('message.other_file_to_upload')); ?> <span class="blue-text">Browse</span> <?php echo e(__('message.or_drop_here')); ?></div>';
        var file_list = '<ul class="file-list"></ul>';
        var rmv = '<div class="remove"><i class="icon-close icons">x</i></div>'

        $fileupload.each(function() {
            var self = this;
            var $dropfield = $('<div class="drop-field"><div class="drop-area"></div></div>');
            $(self).after($dropfield).appendTo($dropfield.find('.drop-area'));
            var $file_list = $(file_list).appendTo($dropfield);
            $dropfield.append(hasitems);
            $dropfield.append(rmv);
            $(noitems).appendTo($file_list);
            var isDropped = false;
            $(self).on("change", function(evt) {
            if ($(self).val() == "") {
                $file_list.find('li').remove();
                $file_list.append(noitems);
            } else {
                if (!isDropped) {
                $dropfield.removeClass('hover');
                $dropfield.addClass('loaded');
                var files = $(self).prop("files");
                traverseFiles(files);
                }
            }
            });

            $dropfield.on("dragleave", function(evt) {
            $dropfield.removeClass('hover');
            evt.stopPropagation();
            });

            $dropfield.on('click', function(evt) {
            $(self).val('');
            $file_list.find('li').remove();
            $file_list.append(noitems);
            $dropfield.removeClass('hover').removeClass('loaded');
            });

            $dropfield.on("dragenter", function(evt) {
            $dropfield.addClass('hover');
            evt.stopPropagation();
            });

            $dropfield.on("drop", function(evt) {
            isDropped = true;
            $dropfield.removeClass('hover');
            $dropfield.addClass('loaded');
            var files = evt.originalEvent.dataTransfer.files;
            traverseFiles(files);
            isDropped = false;
            });


            function appendFile(file) {
            $file_list.append('<li>' + file.name + '</li>');
            }

            function traverseFiles(files) {
            if ($dropfield.hasClass('loaded')) {
                $file_list.find('li').remove();
            }
            if (typeof files !== "undefined") {
                for (var i = 0, l = files.length; i < l; i++) {
                appendFile(files[i]);
                }
            } else {
                console.log("No support for the File API in this web browser");
            }
            }

        });
        };

        $(document).ready(function() {
        globalFunctions.ddInput('input[type="file"]');
        });
    </script>
    <?php $__env->stopSection(); ?>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23)): ?>
<?php $component = $__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23; ?>
<?php unset($__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23); ?>
<?php endif; ?>
<?php /**PATH /home/atharvatek/mxunzo.atharvatek.com/resources/views/app-language-setting/languagewithkeyword/bulkimport.blade.php ENDPATH**/ ?>