
<?php $__env->startSection('content'); ?>
<!-- BEGIN: Content-->
<div class="app-content content ">
    <div class="content-overlay"></div>
    <div class="header-navbar-shadow"></div>
    <div class="content-wrapper container-xxl p-0">
        <div class="content-header row">
            <div class="content-header-left col-md-9 col-12 mb-2">
                <div class="row breadcrumbs-top">
                    <div class="col-12">
                        <h2 class="content-header-title float-start mb-0"><?php echo e(__('lang.admin_product_translation')); ?></h2>
                        <div class="breadcrumb-wrapper">
                            <ol class="breadcrumb">
                                <li class="breadcrumb-item"><a href="<?php echo route('dashboard'); ?>"><?php echo e(__('lang.admin_menu_dashboard')); ?></a>
                                </li>
                                <li class="breadcrumb-item <?php echo e(Request::is('admin/products*') ? 'active' : ''); ?>"><a href="<?php echo route('products.index'); ?>"><?php echo e(__('lang.admin_product_list')); ?></a>
                                </li>
                                <li class="breadcrumb-item active"><?php echo e(__('lang.admin_product_info')); ?>

                                </li>
                            </ol>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="content-body">
            <!-- users edit start -->
            <section class="app-user-edit">
                <div class="card">
                    <div class="card-body">
                        <div class="tab-content">
                            <!-- Account Tab starts -->
                            <div class="tab-pane active" id="account" aria-labelledby="account-tab" role="tabpanel">
                                <div class="row">
                                    <div class="col-md-4">
                                        <div class="mb-1">
                                            <label class="form-label" for="language_code"><?php echo e(__('lang.admin_select_language')); ?></label>
                                            <select class="form-select" id="language_code" name="language_code" onchange="selectLanguage(this.value);" required>
                                                <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($row->language_code); ?>"><?php echo e($row->language_name); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>
                                    </div>
                                </div>

                                <?php echo Form::model($data, ['method' => 'POST','url' => ['admin/products/translation/'.$data->id]]); ?>

                                <?php echo csrf_field(); ?>
                                <?php
                                $i = 0;
                                ?>
                                <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($row->details): ?>
                                    <input type="hidden" name="translation_id[]" value="<?php echo e($row->details->id); ?>">
                                    <input type="hidden" name="language_code[]" value="<?php echo e($row->language_code); ?>">
                                    <div class="row formbody <?php if($i>0){ ?>hide<?php } ?>" id="translation_<?php echo e($row->language_code); ?>">
                                        <div class="col-md-6">
                                            <div class="mb-1">
                                                <label class="form-label" for="description"><?php echo e(__('lang.admin_description')); ?> (<?php echo e($row->language_name); ?>)</label>
                                                <textarea class="form-control flatpickr-basic" placeholder="<?php echo e(__('lang.admin_description')); ?>" name="description[]" id="description"><?php echo e($row->details->description); ?></textarea>
                                            </div>
                                        </div>
                                    </div>
                                    <?php $i++; ?>
                                <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <div class="row">
                                    <div class="col-12 d-flex flex-sm-row flex-column mt-2">
                                        <button type="submit" class="btn btn-primary mb-1 mb-sm-0 me-0 me-sm-1"><?php echo e(__('lang.admin_button_save_changes')); ?></button>
                                        <a href="<?php echo route('products.index'); ?>" class="btn btn-outline-secondary"><?php echo e(__('lang.admin_button_back')); ?></a>
                                    </div>
                                </div>
                                <?php echo Form::close(); ?>

                            </div>
                            <!-- Account Tab ends -->
                        </div>
                    </div>
                </div>
            </section>
            <!-- coupons edit ends -->

        </div>
    </div>
</div>
<!-- END: Content-->
<script type="text/javascript">
    function selectLanguage(langCode){
        $(".formbody").addClass('hide');
        $("#translation_"+langCode).removeClass('hide');
    }
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/MAMP/htdocs/hayawater/resources/views/products/translation.blade.php ENDPATH**/ ?>