<?php
    $auth_user = authSession();
?>
<?php if($delete_at != null): ?>
    <div class="d-flex justify-content-end align-items-center">
        <?php if($auth_user->can('order-edit')): ?>
            <a class="mr-2" href="<?php echo e(route('order.restore', ['id' => $id ,'type'=>'restore'])); ?>" data--confirmation--restore="true" title="<?php echo e(__('message.restore_title')); ?>"><i class="ri-refresh-line" style="font-size:18px"></i></a>
        <?php endif; ?>
        <?php echo e(Form::open(['route' => ['order.force.delete', $id, 'type'=>'forcedelete'], 'method' => 'delete','data--submit'=>'order'.$id])); ?>

            <?php if($auth_user->can('order-delete')): ?>
                <a class="mr-2 text-danger" href="javascript:void(0)" data--submit="order<?php echo e($id); ?>"
                    data--confirmation='true' data-title="<?php echo e(__('message.delete_form_title',['form'=> __('message.order') ])); ?>"
                    title="<?php echo e(__('message.force_delete_form_title',['form'=>  __('message.order') ])); ?>"
                    data-message='<?php echo e(__("message.force_delete_msg")); ?>'>
                    <i class="ri-delete-bin-2-fill" style="font-size:18px"></i>
                </a>
            <?php endif; ?>
        <?php echo e(Form::close()); ?>

    </div>
<?php else: ?>
    <div class="d-flex justify-content-end align-items-center">
        <?php echo e(Form::open(['route' => ['order.destroy', $id], 'method' => 'delete', 'data--submit' => 'order'.$id])); ?>

            <?php if($auth_user->can('order-delete')): ?>
                <a class="mr-2 text-danger" href="javascript:void(0)" data--submit="order<?php echo e($id); ?>"
                data--confirmation='true' data-title="<?php echo e(__('message.delete_form_title',['form'=> __('message.order') ])); ?>"
                title="<?php echo e(__('message.delete_form_title',['form'=>  __('message.order') ])); ?>"
                data-message='<?php echo e(__("message.delete_msg")); ?>'>
                <i class="fas fa-trash-alt"></i>
                </a>
            <?php endif; ?>
        <?php echo e(Form::close()); ?>

        <?php if( auth()->user()->hasRole('admin') && $order->status != 'draft' ): ?>

            <?php if($auth_user->can('order-show')): ?>
            <a class="mr-2" href="<?php echo e(route('order.show',$id)); ?>"><i class="fas fa-eye text-secondary"></i></a>
            <?php endif; ?>
        <?php endif; ?>
    </div>
<?php endif; ?>

<?php /**PATH /www/wwwroot/mxunzo.mimeld.com/resources/views/order/action.blade.php ENDPATH**/ ?>