<?php $__env->startSection('title', admin_trans('Users files') . ' | #' . $fileEntry->id); ?>
<?php $__env->startSection('back', route('admin.files.users.index')); ?>
<?php $__env->startSection('content'); ?>
    <div class="card mb-3">
        <div class="card-body">
            <div class="d-flex align-items-center">
                <div class="flex-shrink-0">
                    <a href="<?php echo e(route('admin.members.users.edit', $fileEntry->user->id)); ?>">
                        <img class="border rounded-circle border-2" src="<?php echo e(asset($fileEntry->user->avatar)); ?>" width="60"
                            height="60">
                    </a>
                </div>
                <div class="flex-grow-1 ms-3">
                    <a href="<?php echo e(route('admin.members.users.edit', $fileEntry->user->id)); ?>" class="text-dark">
                        <h5 class="mb-1"><?php echo e($fileEntry->user->name); ?></h5>
                        <p class="mb-0 text-muted"><?php echo e($fileEntry->user->email); ?></p>
                    </a>
                </div>
                <div class="flex-grow-3 ms-3">
                    <a href="<?php echo e(route('admin.members.users.edit', $fileEntry->user->id)); ?>" class="btn btn-primary"
                        target="_blank"><i class="fa fa-eye me-2"></i><?php echo e(admin_trans('View details')); ?></a>
                </div>
            </div>
        </div>
    </div>
    <div class="row g-3">
        <div class="col-lg-8">
            <div class="card h-100">
                <div class="card-body text-center">
                    <div class="file d-flex h-100 justify-content-center align-items-center">
                        <div class="p-5">
                            <div class="mb-3">
                                <?php echo $fileEntry->getFileIcon('vi-4x'); ?>

                            </div>
                            <h4><?php echo e(shortertext($fileEntry->getFullName(), 50)); ?></h4>
                            <h5 class="text-muted"><?php echo e($fileEntry->getFullSize()); ?></h5>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-4">
            <div class="card h-100">
                <ul class="custom-list-group list-group list-group-flush">
                    <li class="list-group-item">
                        <?php if($fileEntry->isPrivate()): ?>
                            <div class="alert alert-danger text-center">
                                <i class="fa-regular fa-circle-question me-1"></i>
                                <?php echo e(admin_trans('Private files cannot be previewed')); ?>

                            </div>
                        <?php endif; ?>
                        <a href="<?php echo e($fileEntry->isPrivate() ? '#' : $fileEntry->sharedLInk()); ?>" target="_blank"
                            class="btn btn-blue btn-lg w-100 mb-3 <?php echo e($fileEntry->isPrivate() ? 'disabled' : ''); ?>"><i
                                class="fas fa-external-link-alt me-2"></i><?php echo e(admin_trans('Preview')); ?></a>
                        <a href="<?php echo e(route('admin.files.users.statistics', $fileEntry->id)); ?>"
                            class="btn btn-warning btn-lg w-100 mb-3 <?php echo e($fileEntry->isPrivate() ? 'disabled' : ''); ?>"><i
                                class="fa-solid fa-chart-simple me-2"></i><?php echo e(admin_trans('Statistics')); ?></a>
                        <a href="<?php echo e(route('admin.files.users.download', [$fileEntry->id, $fileEntry->getFullName()])); ?>"
                            class="btn btn-success btn-lg w-100 mb-3"><i
                                class="fas fa-download me-2"></i><?php echo e(admin_trans('Download')); ?></a>
                        <button class="btn btn-dark btn-lg w-100 mb-3" data-bs-toggle="modal" data-bs-target="#editModal">
                            <i class="fa fa-edit me-2"></i>
                            <?php echo e(admin_trans('Edit details')); ?>

                        </button>
                        <form action="<?php echo e(route('admin.files.users.destroy', $fileEntry->id)); ?>" method="POST">
                            <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                            <button class="vironeer-able-to-delete btn btn-danger btn-lg w-100"><i
                                    class="far fa-trash-alt me-2"></i><?php echo e(admin_trans('Delete')); ?></button>
                        </form>
                    </li>
                    <li class="list-group-item d-flex justify-content-between">
                        <strong><?php echo e(admin_trans('Name')); ?></strong>
                        <span><?php echo e(shortertext($fileEntry->getFullName(), 30)); ?></span>
                    </li>
                    <li class="list-group-item d-flex justify-content-between">
                        <strong><?php echo e(admin_trans('Shared id')); ?></strong>
                        <span><?php echo e($fileEntry->sharedId()); ?></span>
                    </li>
                    <li class="list-group-item d-flex justify-content-between">
                        <strong><?php echo e(admin_trans('Size')); ?></strong>
                        <span><?php echo e($fileEntry->getFullSize()); ?></span>
                    </li>
                    <li class="list-group-item d-flex justify-content-between">
                        <strong><?php echo e(admin_trans('Storage')); ?></strong>
                        <span>
                            <?php if($fileEntry->storageProvider->isLocal()): ?>
                                <span>
                                    <i class="fas fa-server me-2"></i>
                                    <?php echo e($fileEntry->storageProvider->alias); ?>

                                </span>
                            <?php else: ?>
                                <a class="text-dark capitalize"
                                    href="<?php echo e(route('admin.settings.storage.edit', $fileEntry->storageProvider->id)); ?>">
                                    <i class="fas fa-server me-2"></i>
                                    <?php echo e($fileEntry->storageProvider->alias); ?>

                                </a>
                            <?php endif; ?>
                        </span>
                    </li>
                    <?php if($fileEntry->ip): ?>
                        <li class="list-group-item d-flex justify-content-between">
                            <strong><?php echo e(admin_trans('IP Address')); ?></strong>
                            <?php if(!demoMode()): ?>
                                <?php if($fileEntry->ip): ?>
                                    <a href="<?php echo e(route('admin.members.users.logsbyip', $fileEntry->ip)); ?>"><i
                                            class="fa-solid fa-location-dot me-2"></i><?php echo e($fileEntry->ip); ?></a>
                                <?php else: ?>
                                    <span>--</span>
                                <?php endif; ?>
                            <?php else: ?>
                                <span><?php echo e(admin_trans('Hidden in demo')); ?></span>
                            <?php endif; ?>
                        </li>
                    <?php endif; ?>
                    <li class="list-group-item d-flex justify-content-between">
                        <strong><?php echo e(admin_trans('Visibility')); ?></strong>
                        <span><?php echo e($fileEntry->visibility()); ?></span>
                    </li>
                    <?php if($fileEntry->password): ?>
                        <li class="list-group-item d-flex justify-content-between">
                            <strong><?php echo e(admin_trans('Password')); ?></strong>
                            <span><?php echo e(demoMode() ? admin_trans('Hidden in demo') : $fileEntry->password); ?></span>
                        </li>
                    <?php endif; ?>
                    <li class="list-group-item d-flex justify-content-between">
                        <strong><?php echo e(admin_trans('Uploaded date')); ?></strong>
                        <span><?php echo e(dateFormat($fileEntry->created_at)); ?></span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="modal fade" id="editModal" tabindex="-1" aria-labelledby="editModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="editModalLabel">
                        <i class="fa fa-edit me-2"></i>
                        <?php echo e(admin_trans('Edit file details')); ?>

                    </h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <form action="<?php echo e(route('admin.files.users.update', $fileEntry->id)); ?>" method="POST">
                        <?php echo csrf_field(); ?>
                        <div class="mb-3">
                            <label class="form-label"><?php echo e(admin_trans('Name')); ?></label>
                            <input type="text" name="name" class="form-control form-control-lg"
                                value="<?php echo e($fileEntry->name); ?>" required />
                        </div>
                        <div class="mb-3">
                            <label class="form-label"><?php echo e(translate('Visibility', 'forms')); ?></label>
                            <select name="visibility" class="form-select form-select-lg">
                                <?php $__currentLoopData = \App\Models\FileEntry::getVisibilityOptions(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $visibilityOptionKey => $visibilityOptionValue): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($visibilityOptionKey); ?>"
                                        <?php echo e($visibilityOptionKey == $fileEntry->visibility ? 'selected' : ''); ?>>
                                        <?php echo e($visibilityOptionValue); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="mb-3">
                            <label class="form-label"><?php echo e(admin_trans('Password')); ?></label>
                            <input type="text" name="password" class="form-control form-control-lg"
                                value="<?php echo e($fileEntry->password); ?>" />
                        </div>
                        <div class="mb-4">
                            <label class="form-label"><?php echo e(admin_trans('Description')); ?></label>
                            <textarea name="description" class="form-control" rows="4"><?php echo e($fileEntry->description); ?></textarea>
                        </div>
                        <button class="btn btn-primary btn-lg w-100"><?php echo e(admin_trans('Save changes')); ?></button>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <?php $__env->startPush('styles_libs'); ?>
        <link rel="stylesheet" href="<?php echo e(asset('vendor/libs/vironeer/vironeer-icons.min.css')); ?>">
    <?php $__env->stopPush(); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.layouts.grid', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/neofiles.codenine.biz.id/resources/views/backend/files/users/show.blade.php ENDPATH**/ ?>