<?php
    $auth_user= authSession();
?>
<?php if($delete_at != null): ?>
    <div class="d-flex justify-content-end align-items-center">
        <?php if($auth_user->can('vehicle-edit')): ?>
        <a class="mr-2" href="<?php echo e(route('vehicle.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' => ['vehicle.force.delete', $id, 'type'=>'forcedelete'], 'method' => 'delete','data--submit'=>'vehicle'.$id])); ?>

                <?php if($auth_user->can('vehicle-delete')): ?>
                    <a class="mr-2 text-danger" href="javascript:void(0)" data--submit="vehicle<?php echo e($id); ?>"
                        data--confirmation='true' data-title="<?php echo e(__('message.delete_form_title',['form'=> __('message.vehicle') ])); ?>"
                        title="<?php echo e(__('message.force_delete_form_title',['form'=>  __('message.vehicle') ])); ?>"
                        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: ?>
    <?php if($action_type == 'status'): ?>
        <div class="custom-switch custom-switch-text custom-switch-color custom-control-inline">
            <div class="custom-switch-inner">
                <input type="checkbox" class="custom-control-input bg-success change_status" data-type="vehicle" id="<?php echo e($data->id); ?>" data-id="<?php echo e($data->id); ?>" <?php echo e(($data->status == '0' ? 0 : 1) ? 'checked' : ''); ?> value="<?php echo e($data->id); ?>">
                <label class="custom-control-label" for="<?php echo e($data->id); ?>" data-on-label="" data-off-label=""></label>
            </div>
        </div>
    <?php endif; ?>

    <?php if($action_type == 'action'): ?>
        <div class="d-flex justify-content-end align-items-center">
            <?php if($auth_user->can('vehicle-edit')): ?>
            <a class="mr-2" href="<?php echo e(route('vehicle.edit', $id)); ?>" title="<?php echo e(__('message.update_form_title',['form' => __('message.vehicle') ])); ?>"><i class="fas fa-edit text-primary"></i></a>
            <?php endif; ?>

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

            <?php if($auth_user->can('vehicle-delete')): ?>
                <?php echo e(Form::open(['route' => ['vehicle.destroy', $id], 'method' => 'delete','data--submit'=>'vehicle'.$id])); ?>

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

            <?php endif; ?>
        </div>
    <?php endif; ?>
<?php endif; ?>
<?php /**PATH /www/wwwroot/mxunzo.mimeld.com/resources/views/vehicle/action.blade.php ENDPATH**/ ?>