<?php $__env->startSection('site_title', formatTitle([__('Edit'), __('Report'), config('settings.title')])); ?>

<?php echo $__env->make('shared.breadcrumbs', ['breadcrumbs' => [
    ['url' => request()->is('admin/*') ? route('admin.dashboard') : route('dashboard'), 'title' => request()->is('admin/*') ? __('Admin') : __('Home')],
    ['title' => __('Edit')],
]], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<div class="d-flex">
    <h1 class="h2 mb-3 text-break"><?php echo e(__('Edit')); ?></h1>
</div>

<div class="card border-0 shadow-sm">
    <div class="card-header align-items-center">
        <div class="row">
            <div class="col">
                <div class="font-weight-medium py-1"><?php echo e(__('Report')); ?></div>
            </div>
            <div class="col-auto d-flex">
                <div class="form-row">
                    <div class="col">
                        <?php echo $__env->make('reports.partials.menu', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="card-body">
        <?php echo $__env->make('shared.message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        <form action="<?php echo e(request()->is('admin/*') ? route('admin.reports.edit', $report->id) : route('reports.edit', $report->id)); ?>" method="post" enctype="multipart/form-data">
            <?php echo csrf_field(); ?>

            <?php if(request()->is('admin/*')): ?>
                <input type="hidden" name="user_id" value="<?php echo e($report->user->id); ?>">
            <?php endif; ?>

            <div class="form-group">
                <label for="i-url"><?php echo e(__('URL')); ?></label>
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text"><img src="https://icons.duckduckgo.com/ip3/<?php echo e($report->url); ?>.ico" rel="noreferrer" class="width-4 height-4"></span>
                    </div>
                    <input type="text" dir="ltr" name="url" class="form-control<?php echo e($errors->has('url') ? ' is-invalid' : ''); ?>" id="i-url" value="<?php echo e($report->url); ?>" disabled>
                    <?php if($errors->has('url')): ?>
                        <span class="invalid-feedback" role="alert">
                            <strong><?php echo e($errors->first('url')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <hr>

            <div class="form-group">
                <label><?php echo e(__('Privacy')); ?></label>
                <div class="form-group mb-0">
                    <div class="row mx-n2">
                        <div class="col-12 col-lg-4 px-2">
                            <div class="custom-control custom-radio">
                                <input type="radio" id="i-privacy1" name="privacy" class="custom-control-input<?php echo e($errors->has('privacy') ? ' is-invalid' : ''); ?>" value="1" <?php if($report->privacy == 1 && old('privacy') == null || old('privacy') == 1): ?> checked <?php endif; ?>>
                                <label class="custom-control-label cursor-pointer w-100" for="i-privacy1">
                                    <div><?php echo e(__('Private')); ?></div>
                                    <div class="small text-muted"><?php echo e(__('Stats accessible only by you.')); ?></div>
                                </label>
                            </div>
                        </div>

                        <div class="col-12 col-lg-4 px-2">
                            <div class="custom-control custom-radio">
                                <input type="radio" id="i-privacy0" name="privacy" class="custom-control-input<?php echo e($errors->has('privacy') ? ' is-invalid' : ''); ?>" value="0" <?php if($report->privacy == 0 && old('privacy') == null || old('privacy') == 0 && old('privacy') != null): ?> checked <?php endif; ?>>
                                <label class="custom-control-label cursor-pointer w-100" for="i-privacy0">
                                    <div><?php echo e(__('Public')); ?></div>
                                    <div class="small text-muted"><?php echo e(__('Stats accessible by anyone.')); ?></div>
                                </label>
                            </div>
                        </div>

                        <div class="col-12 col-lg-4 px-2">
                            <div class="custom-control custom-radio">
                                <input type="radio" id="i-privacy2" name="privacy" class="custom-control-input<?php echo e($errors->has('privacy') ? ' is-invalid' : ''); ?>" value="2" <?php if($report->privacy == 2 && old('privacy') == null || old('privacy') == 2): ?> checked <?php endif; ?>>
                                <label class="custom-control-label cursor-pointer w-100" for="i-privacy2">
                                    <div><?php echo e(__('Password')); ?></div>
                                    <div class="small text-muted"><?php echo e(__('Stats accessible by password.')); ?></div>
                                </label>

                                <div id="input-password" class="<?php echo e((((old('privacy') == 2) || (old('privacy') == null && $report->privacy == 2)) ? '' : 'd-none')); ?>">
                                    <div class="input-group mt-2">
                                        <div class="input-group-prepend">
                                            <div class="input-group-text cursor-pointer" data-tooltip="true" data-title="<?php echo e(__('Show password')); ?>" data-password="i-password" data-password-show="<?php echo e(__('Show password')); ?>" data-password-hide="<?php echo e(__('Hide password')); ?>"><?php echo $__env->make('icons.lock', ['class' => 'width-4 height-4 fill-current text-muted'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?></div>
                                        </div>
                                        <input id="i-password" type="password" class="form-control<?php echo e($errors->has('password') ? ' is-invalid' : ''); ?>" name="password" value="<?php echo e(request()->is('admin/*') ? '' : (old('password') ?? $report->password)); ?>" autocomplete="new-password" <?php if(request()->is('admin/*')): ?> disabled <?php endif; ?>>
                                    </div>
                                    <?php if($errors->has('password')): ?>
                                    <span class="invalid-feedback d-block" role="alert">
                                        <strong><?php echo e($errors->first('password')); ?></strong>
                                    </span>
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php if($errors->has('privacy')): ?>
                        <span class="invalid-feedback d-block" role="alert">
                            <strong><?php echo e($errors->first('privacy')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <button type="submit" name="submit" class="btn btn-primary"><?php echo e(__('Save')); ?></button>
        </form>
    </div>
</div>

<?php if(request()->is('admin/*')): ?>
    <?php echo $__env->make('admin.users.partials.card', ['user' => $report->user], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endif; ?>
<?php /**PATH /home/repixa5/dashboard.rankqwik.com/resources/views/reports/edit.blade.php ENDPATH**/ ?>