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

    <div class="border-item">
        <form class="form-row" method="post" action="<?php echo e($action); ?>">
            <?php if($order ?? ''  && $order->id): ?>
                <?php echo method_field('PUT'); ?>
            <?php endif; ?>
            <?php echo csrf_field(); ?>

            <div class="form-group col-lg-12">
                <h3><?php echo e(__('orders.status')); ?></h3>
            </div>
            <div class="form-group col-lg-6">
                <label><?php echo e(__('orders.status')); ?>  </label>
                <select class="form-control <?php echo e($errors->has('status') ? 'is-invalid' : ''); ?>" name="status">
                    <?php $__currentLoopData = $statuses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option <?php if($row == $order->status): ?> selected <?php endif; ?> value="<?php echo e($row); ?>"><?php echo e(__('orders.'.$row)); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>

            <div class="text-center mt-5 col-6">
                <button class="butn"><span><?php echo e(__('dashboard.save')); ?></span></button>
            </div>
        </form>
        <hr>
        <form class="form-row" >
            <div class="form-group col-lg-12">
                <h3><?php echo e(__('orders.payment')); ?></h3>
            </div>
            <?php if($payment): ?>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.payment_status')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e(__('orders.'.$payment->status)); ?>">
                </div>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.total_products')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e($payment->total_products); ?>">
                </div>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.tax_cost')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e($payment->tax_cost); ?>">
                </div>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.total_product_tax')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e($payment->total_product_tax); ?>">
                </div>
                <?php if($order->cobon_id): ?>
                    <div class="form-group col-lg-6">
                        <label><?php echo e(__('orders.cobon')); ?>  </label>
                        <input disabled class="form-control" value="<?php echo e($payment->cobon->code); ?>">
                    </div>
                    <div class="form-group col-lg-6">
                        <label><?php echo e(__('orders.cobon_discount')); ?>  </label>
                        <input disabled class="form-control" value="<?php echo e($payment->cobon_discount); ?>">
                    </div>
                <?php endif; ?>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.shipping_cost')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e($payment->shipping_cost); ?>">
                </div>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.seller_commission')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e($payment->seller_commission); ?>">
                </div>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.total_commission')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e($payment->total_commission); ?>">
                </div>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.total')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e($payment->total); ?>">
                </div>
            <?php endif; ?>
        </form>
        <hr>
        <form class="form-row" >
            <div class="form-group col-lg-12">
                <h3><?php echo e(__('orders.user_info')); ?></h3>
            </div>
            <div class="form-group col-lg-6">
                <label><?php echo e(__('orders.user_name')); ?>  </label>
                <input disabled class="form-control" value="<?php echo e($order->user->name); ?>">
            </div>
            <div class="form-group col-lg-6">
                <label><?php echo e(__('orders.user_email')); ?>  </label>
                <input disabled class="form-control" value="<?php echo e($order->user->email); ?>">
            </div>
            <div class="form-group col-lg-6">
                <label><?php echo e(__('orders.user_phone')); ?>  </label>
                <input disabled class="form-control" value="<?php echo e($order->user->phone); ?>">
            </div>
            <div class="form-group col-lg-6">
                <label><?php echo e(__('orders.user_status')); ?>  </label>
                <input disabled class="form-control" value="<?php echo e($order->user->role == null ? __('orders.visitor') : ($order->user->role == 'company' ? __('orders.company') : __('orders.user') )); ?>">
            </div>
        </form>
        <hr>
        <form class="form-row" >
            <div class="form-group col-lg-12">
                <h3><?php echo e(__('orders.address')); ?></h3>
            </div>
            <?php if($address): ?>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.address')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e($address->address->address); ?>">
                </div>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.country')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e($address->address->country->currentDescription->name); ?>">
                </div>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.city')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e($address->address->city->currentDescription->name); ?>">
                </div>
            <?php endif; ?>
        </form>
        <hr>
        <form class="form-row" >
            <div class="form-group col-lg-12">
                <h3><?php echo e(__('orders.shipping')); ?></h3>
            </div>
            <?php if($shipping): ?>
                <div class="form-group col-lg-6">
                    <label><?php echo e(__('orders.shipping')); ?>  </label>
                    <input disabled class="form-control" value="<?php echo e($shipping->shipping->currentDescription->name); ?>">
                </div>
                <?php if($shipping->shipping_status): ?>
                    <div class="form-group col-lg-6">
                        <label><?php echo e(__('orders.shipping_status')); ?>  </label>
                        <input disabled class="form-control" value="<?php echo e($shipping->shipping_status); ?>">
                    </div>
                <?php endif; ?>
                <?php if($shipping->policy_number): ?>
                    <div class="form-group col-lg-6">
                        <label><?php echo e(__('orders.policy_number')); ?>  </label>
                        <input disabled class="form-control" value="<?php echo e($shipping->policy_number); ?>">
                    </div>
                <?php endif; ?>
                <?php if($shipping->representative_name): ?>
                    <div class="form-group col-lg-6">
                        <label><?php echo e(__('orders.representative_name')); ?>  </label>
                        <input disabled class="form-control" value="<?php echo e($shipping->representative_name); ?>">
                    </div>
                <?php endif; ?>
            <?php endif; ?>
        </form>
        <hr>
        <form class="form-row" >
            <div class="form-group col-lg-12">
                <h3><?php echo e(__('orders.products')); ?></h3>
            </div>
            <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i=>$product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="row pricing-list-item border-item mb-4" >
                    <div class="col-lg-12">
                        <label><?php echo e(__('orders.product')); ?> : <?php echo e($i+1); ?></label>
                    </div>

                    <div class="form-group col-lg-6">
                        <label><?php echo e(__('orders.product_name')); ?>  </label>
                        <input type="text" class="form-control " disabled value='<?php echo e($product->product->currentDescription->name); ?>'/>
                    </div>
                    <?php if($product->choice_id): ?>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.choice_id')); ?>  </label>
                            <input type="text" class="form-control " disabled value='<?php echo e($product->choice->attribute->choiceAttr->choice->currentLangauge->name); ?> - <?php echo e($product->choice->choice->currentLangauge->name); ?>'/>
                        </div>
                    <?php endif; ?>

                    <div class="form-group col-lg-6">
                        <label><?php echo e(__('orders.product_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(__('orders.product_tax')); ?>  </label>
                        <input type="text" class="form-control " disabled value='<?php echo e($product->tax); ?>'/>
                    </div>

                    <div class="form-group col-lg-6">
                        <label><?php echo e(__('orders.product_total')); ?>  </label>
                        <input type="text" class="form-control " disabled value='<?php echo e($product->total); ?>'/>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </form>
    </div>

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

<?php $__env->startSection('inner_js'); ?>
    <!-- Editor JS files -->
    <script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
    <script>
        function countries(elem)
        {
            var data = $(elem).val();
            $.ajax({
                url : url_country,
                type : 'GET',
                data : 'id='+data,
                success:function(data)
                {
                    $('#city_id').html(data);
                }
            })
        }
    </script>
    <script>
        let route_prefix = "<?php echo e(url(config('lfm.prefix'))); ?>",
            url = "<?php echo e(url('/')); ?>/",
            url_country = "<?php echo e(url('/')); ?>/admin/country",
            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/city/resources/views/admin/orders/form.blade.php ENDPATH**/ ?>