<?php $__env->startSection('content'); ?>
<div class="side-title">
    <h3><?php echo e($head ?? ''); ?></h3>
</div>



<div class="border-item">
    <ul class="nav nav-pills bg-nav-pills nav-justified mb-3">
        <li class="nav-item">
            <a href="#main" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0 active">
                <i class="mdi mdi-home-variant d-lg-none d-block mr-1"></i>
                <span class="d-none d-lg-block"><?php echo e(__('products.details')); ?></span>
            </a>
        </li>
        <li class="nav-item">
            <a href="#store_details" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0">
                <i class="mdi mdi-home-variant d-lg-none d-block mr-1"></i>
                <span class="d-none d-lg-block"><?php echo e(__('products.store_details')); ?></span>
            </a>
        </li>
        <li class="nav-item">
            <a href="#section_images" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0">
                <i class="mdi mdi-home-variant d-lg-none d-block mr-1"></i>
                <span class="d-none d-lg-block"><?php echo e(__('products.images')); ?></span>
            </a>
        </li>
        <li class="nav-item">
            <a href="#section_items" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0">
                <i class="mdi mdi-home-variant d-lg-none d-block mr-1"></i>
                <span class="d-none d-lg-block"><?php echo e(__('products.items')); ?></span>
            </a>
        </li>
        <li class="nav-item">
            <a href="#section_additions" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0">
                <i class="mdi mdi-home-variant d-lg-none d-block mr-1"></i>
                <span class="d-none d-lg-block"><?php echo e(__('products.additions')); ?></span>
            </a>
        </li>
        <li class="nav-item">
            <a href="#section_reasons" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0">
                <i class="mdi mdi-home-variant d-lg-none d-block mr-1"></i>
                <span class="d-none d-lg-block"><?php echo e(__('products.reasons')); ?></span>
            </a>
        </li>
        <li class="nav-item">
            <a href="#section_actions" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0">
                <i class="mdi mdi-home-variant d-lg-none d-block mr-1"></i>
                <span class="d-none d-lg-block"><?php echo e(__('products.actions')); ?></span>
            </a>
        </li>

    </ul>
    <form class="form-row" method="post" onsubmit="saveForm(this)" action="<?php echo e($action); ?>" enctype="multipart/form-data">
        <?php if($product ?? ''  && $product->id): ?>
            <?php echo method_field('PUT'); ?>
        <?php endif; ?>
        <?php echo csrf_field(); ?>
        <div class="tab-content row col-12">
            <div class="tab-pane col-lg-12 active" id="main">
                <div class="form-row">



                    <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(meta('title', $language->local) ?? __('products.title')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
                            <input type="text" class="form-control" disabled value='<?php echo e($product[$language->local]->title); ?>'/>
                        </div>
                        <div class="form-group col-lg-12">
                            <label><?php echo e(meta('description', $language->local) ?? __('products.description')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
                            <textarea  class="form-control"disabled><?php echo e(old("description_{$language->local}", $product[$language->local]->description ?? "")); ?></textarea>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


                    <div class="form-group col-lg-6" >
                        <label><?php echo e(__('products.count')); ?> </label>
                        <input type="text" class="form-control" disabled  value='<?php echo e($product->count); ?>'/>
                    </div>

                    <div class="form-group col-lg-6" >
                        <label><?php echo e(__('products.cost')); ?> </label>
                        <input type="text" class="form-control" disabled value='<?php echo e($product->cost); ?>'/>
                    </div>

                    <div class="form-group col-lg-6" >
                        <label><?php echo e(__('products.cost_discount')); ?> </label>
                        <input type="text" class="form-control" disabled value='<?php echo e($product->cost_discount); ?>'/>
                    </div>


                </div>

            </div>
            <div class="tab-pane col-lg-12" id="store_details">
                <div class="row">
                    <div class="col-lg-12">
                        <h3> <?php echo e(__('products.store.details')); ?> </h3>
                    </div>
                    <div class="row col-lg-12">

                        <div class="form-group col-lg-6" >
                            <label><?php echo e(__('products.store.name')); ?> </label>
                            <input type="text" class="form-control" disabled  value='<?php echo e($product->store->name); ?>'/>
                        </div>
                        <div class="form-group col-lg-6" >
                            <label><?php echo e(__('products.store.category')); ?> </label>
                            <input type="text" class="form-control" disabled  value='<?php echo e($product->store->category->currentDescription->name); ?>'/>
                        </div>
                        <div class="form-group col-lg-6" >
                            <label><?php echo e(__('products.store.sub_category')); ?> </label>
                            <input type="text" class="form-control" disabled  value='<?php echo e($product->store->subCategory->currentDescription->name); ?>'/>
                        </div>
                        <div class="form-group col-lg-6" >
                            <label><?php echo e(__('products.store.created_at')); ?> </label>
                            <input type="text" class="form-control" disabled  value='<?php echo e($product->store->created_at); ?>'/>
                        </div>
                        <div class="form-group col-lg-6" >
                            <label><?php echo e(__('products.store.accepted_at')); ?> </label>
                            <input type="text" class="form-control" disabled  value='<?php echo e($product->store->accepted_at); ?>'/>
                        </div>
                        <div class="form-group col-lg-6" >
                            <h4><?php echo e(__('products.store.logo')); ?> </h4>
                            <img style="width: 100%;height: 30pc" src="<?php echo e(asset($product->store->logo)); ?>"/>
                        </div>

                    </div>
                </div>
            </div>
            <div class="tab-pane col-lg-12" id="section_images">
                <div class="row">
                    <div class="col-lg-12">
                        <h3> <?php echo e(__('products.images')); ?> </h3>
                    </div>
                    <div class="form-group col-lg-6" >
                        <h4><?php echo e(__('products.main_image')); ?> </h4>
                        <img style="width: 100%;height: 30pc" src="<?php echo e(asset($product->image)); ?>"/>
                    </div>
                    <div class="form-group col-lg-6" ></div>

                    <?php $__currentLoopData = $product['photos']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="form-group col-lg-6" >
                            <h4><?php echo e(__('products.photo')); ?> </h4>
                            <img style="width: 100%;height: 30pc" src="<?php echo e(asset($photo->photo)); ?>"/>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                </div>
            </div>
            <div class="tab-pane col-lg-12" id="section_items">
                <div class="row">
                    <div class="col-lg-12">
                        <h3> <?php echo e(__('products.items')); ?> </h3>
                    </div>
                    <div class="col-lg-12" >
                        <?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="row pricing-list-item  mb-4 "  style="background-color: rgba(21,97,203,0.1);height:auto;padding: 20px">
                                <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div class="form-group col-lg-6">
                                        <label><?php echo e(__('products.title')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
                                        <input type="text" class="form-control" disabled value="<?php echo e($row->descriptions($language->id)->title); ?>"/>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                <div class="pricing-list-item col-lg-12 mb-4 "   style="background-color: white;height:auto;padding: 20px">
                                    <?php $__currentLoopData = $row->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $keyItem=>$rowItem): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <div class="row pricing-list-item  mb-4 "  style="background-color: rgba(21,97,203,0.1);height:auto;padding: 20px">

                                            <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <div class="form-group col-lg-6">
                                                    <label><?php echo e(__('products.title')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
                                                    <input type="text" class="form-control" disabled value="<?php echo e($rowItem->descriptions($language->id)->title); ?>"/>
                                                </div>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            <div class="form-group col-lg-6">
                                                <label><?php echo e(__('products.cost')); ?> </label>
                                                <input type="text" class="form-control" disabled value="<?php echo e($rowItem->cost); ?>"/>
                                            </div>
                                        </div>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </div>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
            </div>

            <div class="tab-pane col-lg-12" id="section_additions">
                <div class="row">
                    <div class="col-lg-12">
                        <h3> <?php echo e(__('products.additions')); ?> </h3>
                    </div>
                    <div class="col-lg-12" >
                        <?php $__currentLoopData = $additions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="row pricing-list-item  mb-4 "  style="background-color: rgba(21,97,203,0.1);height:auto;padding: 20px">
                                <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div class="form-group col-lg-6">
                                        <label><?php echo e(__('products.title')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
                                        <input type="text" class="form-control" disabled value="<?php echo e($row->descriptions($language->id)->title); ?>"/>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <div class="form-group col-lg-6">
                                    <label><?php echo e(__('products.cost')); ?> </label>
                                    <input type="text" class="form-control" disabled value="<?php echo e($row->cost); ?>"/>
                                </div>

                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
            </div>

            <div class="tab-pane col-lg-12" id="section_reasons">
                <div class="row">
                    <div class="col-lg-12">
                        <h3> <?php echo e(__('products.logs')); ?> </h3>
                    </div>
                    <div class="col-lg-12" >
                        <?php $__currentLoopData = $logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="row pricing-list-item  mb-4 "  style="background-color: rgba(21,97,203,0.1);height:auto;padding: 20px">
                                <div class="form-group col-lg-6">
                                    <label><?php echo e(__('products.message')); ?> </label>
                                    <input type="text" class="form-control" disabled value="<?php echo e($row->message); ?>"/>
                                </div>
                                <div class="form-group col-lg-6">
                                    <label><?php echo e(__('products.reason_id')); ?> </label>
                                    <input type="text" class="form-control" disabled value="<?php echo e($row->reason->currentDescription->title); ?>"/>
                                </div>
                                <div class="form-group col-lg-6">
                                    <label><?php echo e(__('products.created_at')); ?> </label>
                                    <input type="text" class="form-control" disabled value="<?php echo e(date('Y-m-d g:i a',strtotime($row->created_at))); ?>"/>
                                </div>


                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
            </div>
            <div class="tab-pane col-lg-12" id="section_actions">
                <div class="row">
                    <div class="col-lg-12">
                        <h3> <?php echo e(__('products.action')); ?> </h3>
                    </div>
                    <div class="col-lg-12 row" >
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('products.status')); ?> </label>
                            <select onchange="selectStatus()" id="status" name="status" class="form-control">
                                <?php $__currentLoopData = $statuses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option <?php echo e($product->status == $row ? 'selected' : ''); ?> value="<?php echo e($row); ?>"><?php echo e(__('products.statuses.'.$row)); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="form-group col-lg-6 refuse">
                            <label><?php echo e(__('products.message')); ?> </label>
                            <input type="text" name="message" placeholder="<?php echo e(__('products.message')); ?>" class="form-control">
                        </div>
                        <div class="form-group col-lg-6 refuse">
                            <label><?php echo e(__('products.reason_id')); ?> </label>
                            <select name="reason_id" class="form-control">
                                <option value=""><?php echo e(__('dashboard.select')); ?></option>
                                <?php $__currentLoopData = $reasons; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option  value="<?php echo e($row->id); ?>"><?php echo e($row->title); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                    </div>
                    <div class="text-center mt-5 col-12">
                        <button class="butn" ><span><?php echo e(__('dashboard.save')); ?></span></button>
                    </div>
                </div>
            </div>


        </div>


    </form>
</div>

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

<?php $__env->startSection('inner_js'); ?>
    <!-- Editor JS orders -->
    
    <script src="<?php echo e(asset('/assets/admin/js/lib/tinymce.min.js')); ?>"></script>
    <script>
        function selectStatus()
        {
            let status = $('#status').val()
            if(status != 1)
            {
                $('.refuse').show()
            }
            else
            {
                $('.refuse').hide()
            }
        }
        $('#status').trigger('change')
    </script>
    <script>
        let route_prefix = "<?php echo e(url(config('lfm.prefix'))); ?>",
            url = "<?php echo e(url('/')); ?>/",
            currentLanguage = "<?php echo e(getCurrentLocale()); ?>",
            imagePath = "<?php echo e(asset('')); ?>";
    </script>
    <script src="<?php echo e(asset('assets/admin/js/editor.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/admin/js/lfm.js')); ?>"></script>
<?php $__env->stopSection(); ?>




<?php echo $__env->make('admin.layouts.container', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/MAMP/htdocs/made/resources/views/admin/products/form.blade.php ENDPATH**/ ?>