<?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="#details" 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(__('orders.details')); ?></span>
                </a>
            </li>
            <li class="nav-item">
                <a href="#payment_info" 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(__('orders.payment_info')); ?></span>
                </a>
            </li>
            <li class="nav-item">
                <a href="#user_info" 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(__('orders.user_info')); ?></span>
                </a>
            </li>
            <li class="nav-item">
                <a href="#address" 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(__('orders.address_details')); ?></span>
                </a>
            </li>
            <li class="nav-item">
                <a href="#products" 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(__('orders.products')); ?></span>
                </a>
            </li>

        </ul>
        <form class="form-row" method="post" onsubmit="saveForm(this)" action="<?php echo e($action); ?>" enctype="multipart/form-data">
            <?php echo method_field('PUT'); ?>
            <?php echo csrf_field(); ?>

            <div class="tab-content col-lg-12">
                <div class="tab-pane active" id="details">
                    <div class="row">
                        <div class="col-lg-12">
                            <h3>
                                <?php echo e(__('orders.details')); ?>

                            </h3>
                            <hr>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.status')); ?> </label>
                            <select name="status" class="form-control">
                                <?php $__currentLoopData = $statuses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option <?php echo e($order->status == $row ? 'selected' : ''); ?> value="<?php echo e($row); ?>"><?php echo e(__('orders.statuses.'.$row)); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.id')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->id); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.date')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->date); ?></p>
                        </div>

                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.way_id')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->way->currentDescription->title); ?></p>
                        </div>

                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.payment_status')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e(__('orders.payment_statuses.'.$order->payment_status)); ?></p>
                        </div>

                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.shipping_id')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->shipping->currentDescription->title); ?></p>
                        </div>

                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.note')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->note); ?></p>
                        </div>
                        
                        <div class="text-center mt-5 col-12">
                            <button class="butn"><span><?php echo e(__('dashboard.save')); ?></span></button>
                        </div>

                    </div>

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

                            </h3>
                            <hr>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.total_tax')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->total_tax ?? ''); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.shipping_cost')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->shipping_cost ?? ''); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.on_hand_cost')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->on_hand_cost ?? ''); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.total_products')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->total_products ?? ''); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.discount')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->discount ?? ''); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.total')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->total ?? ''); ?></p>
                        </div>

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

                            </h3>
                            <hr>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.user_status')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e(__('orders.user_statuses.'.$order->user_status)); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.user_name')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->user->name ?? ''); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.user_email')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->user->email ?? ''); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.user_phone')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->user->phone ?? ''); ?></p>
                        </div>

                    </div>
                </div>
                <div class="tab-pane" id="address">
                    <div class="row">
                        <div class="col-lg-12">
                            <h3>
                                <?php echo e(__('orders.address_details')); ?>

                            </h3>
                            <hr>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('web.address_name')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->address->name); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('web.phone')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->address->phone); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.address')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->address->address); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.city')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->address->city->currentDescription->title); ?></p>
                        </div>
                        <div class="form-group col-lg-6">
                            <label><?php echo e(__('orders.area')); ?> </label>
                            <p class="form-control" style="height: auto"><?php echo e($order->address->area->currentDescription->title); ?></p>
                        </div>
                        <div class="form-group col-lg-12">
                            <iframe
                                style='width:100%'
                                height="250"
                                frameborder="0"
                                scrolling="no"
                                marginheight="0"
                                marginwidth="0"
                                src="https://maps.google.com/maps?q=<?php echo e($order->address->latitude.', '.$order->address->longitude); ?>&z=15&output=embed"
                            >
                            </iframe>
                        </div>


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

                            </h3>
                            <hr>
                        </div>
                        <div class="col-lg-12">
                            <?php $__currentLoopData = $order->products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="col-lg-12 pricing-list-item border-item mb-4"  style="background-color: rgba(21,97,203,0.1);height:auto">
                                    <div class="row">
                                        <div class="form-group col-lg-6">
                                            <label><?php echo e(__('orders.product_code')); ?> </label>
                                            <p class="form-control" style="height: auto"><?php echo e($row->product->code); ?></p>
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label><?php echo e(__('orders.product_name')); ?> </label>
                                            <p class="form-control" style="height: auto"><?php echo e($row->product->currentDescription->title); ?> <?php echo e($row->sub_attribute_id ? (' - '.$row->mainAttr->currentDescription->title .' - '. $row->subAttr->currentDescription->title) : ''); ?></p>
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label><?php echo e(__('orders.product_main_category')); ?> </label>
                                            <p class="form-control" style="height: auto"><?php echo e($row->product->category->currentDescription->title); ?></p>
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label><?php echo e(__('orders.product_sub_category')); ?> </label>
                                            <p class="form-control" style="height: auto"><?php echo e($row->product->subCategory->currentDescription->title); ?></p>
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label><?php echo e(__('orders.count')); ?> </label>
                                            <p class="form-control" style="height: auto"><?php echo e($row->count); ?></p>
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label><?php echo e(__('orders.product_cost')); ?> </label>
                                            <p class="form-control" style="height: auto"><?php echo e($row->total); ?></p>
                                        </div>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </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>
        var route_prefix = "<?php echo e(url(config('lfm.prefix'))); ?>";
        var url = "<?php echo e(url('/')); ?>/";
    </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 /home/omaralyomhost/public_html/rose/resources/views/admin/orders/form.blade.php ENDPATH**/ ?>