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

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

 <?php else: ?>
    <div class="custom-switch custom-switch-text custom-switch-color custom-control-inline">
        <div class="custom-switch-inner">
            <?php if($action_type == 'email_verified'): ?>
                <input type="checkbox" class="custom-control-input bg-success change_user_verification"
                    data-type="user" data-name="is_autoverified_email" id="email_<?php echo e($data['id']); ?>" data-id="<?php echo e($data['id']); ?>"
                    <?php echo e($data['is_autoverified_email'] == '1' ? 'checked' : ''); ?> value="<?php echo e($data['id']); ?>">
                <label class="custom-control-label" for="email_<?php echo e($data['id']); ?>" data-on-label="" data-off-label=""></label>
            <?php endif; ?>
            <?php if($action_type == 'mobile_verified'): ?>
                <input type="checkbox" class="custom-control-input bg-success change_user_verification"
                    data-type="user" data-name="is_autoverified_mobile" id="mobile_<?php echo e($data['id']); ?>" data-id="<?php echo e($data['id']); ?>"
                    <?php echo e($data['is_autoverified_mobile'] == '1' ? 'checked' : ''); ?> value="<?php echo e($data['id']); ?>">
                <label class="custom-control-label" for="mobile_<?php echo e($data['id']); ?>" data-on-label="" data-off-label=""></label>
            <?php endif; ?>
            <?php if($action_type == 'document_verified'): ?>
                <input type="checkbox" class="custom-control-input bg-success change_user_verification"
                    data-type="user" data-name="is_autoverified_document" id="document_<?php echo e($data['id']); ?>" data-id="<?php echo e($data['id']); ?>"
                    <?php echo e($data['is_autoverified_document'] == '1' ? 'checked' : ''); ?> value="<?php echo e($data['id']); ?>">
                <label class="custom-control-label" for="document_<?php echo e($data['id']); ?>" data-on-label="" data-off-label=""></label>
            <?php endif; ?>
        </div>
    </div>
    <?php if($action_type == 'status'): ?>
        <div class="custom-switch custom-switch-text custom-switch-color custom-control-inline m-0">
            <div class="custom-switch-inner">
                <input type="checkbox" class="custom-control-input bg-success change_status" data-type="user" 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 == 'verify'): ?>
        <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_verify" data-type="verify" id="<?php echo e($data->id); ?>_verifySwitch" data-id="<?php echo e($data->id); ?>" <?php echo e($data->otp_verify_at ? 'checked' : ''); ?> value="<?php echo e($data->id); ?>">
                <label class="custom-control-label" for="<?php echo e($data->id); ?>_verifySwitch" 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('deliveryman-edit')): ?>
                <a class="mr-2" href="<?php echo e(route('deliveryman.edit', $id)); ?>" title="<?php echo e(__('message.update_form_title',['form' => __('message.deliveryman') ])); ?>"><i class="fas fa-edit text-primary"></i></a>
            <?php endif; ?>

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

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

                    <a class="mr-2 text-danger" href="javascript:void(0)" data--submit="deliveryman<?php echo e($id); ?>"
                        data--confirmation='true' data-title="<?php echo e(__('message.delete_form_title',['form'=> __('message.deliveryman') ])); ?>"
                        title="<?php echo e(__('message.delete_form_title',['form'=>  __('message.deliveryman') ])); ?>"
                        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 /home/atharvatek/mxunzo.atharvatek.com/resources/views/deliveryman/action.blade.php ENDPATH**/ ?>