<?php $__env->startSection('title', __('User Management')); ?>

<!DOCTYPE html>
<html>
<head>
    <style>
        .image-container {
            display: flex;
            justify-content: space-between;
            gap: 20px;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .image-box {
            flex: 1;
            max-width: calc(33.33% - 14px);
        }

        .image-box img {
            width: 100%;
            height: auto;
            display: block;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        /* Responsive design */
        @media (max-width: 768px) {
            .image-container {
                flex-direction: column;
            }
            
            .image-box {
                max-width: 100%;
                margin-bottom: 20px;
            }
        }
    </style>
</head>

<?php $__env->startSection('content'); ?>
    <div class="message" style="display:none;">
		<div data-key="string.server.common.error" data-value="<?php echo e(__('string.server.common.error')); ?>"></div>
    </div>
    <div class="card capture-face">
        <div class="card-body">
            <div class="text-center">
                <h3 class="card-title font-weight-bold"><?php echo e(__('string.capture_face.header')); ?></h3>
                <!-- <p><?php echo e(__('string.capture_face.description')); ?></p> -->
            </div>
            <!--col -->
            <?php echo Form::open(['url' => route('admin.user.capture-face.update'), 'id' => 'submit-image-face']); ?>

            <div class="form-group row">
                <div class="mb-3 col-md-1" style="display:flex; align-items:center; justify-content:right;"><?php echo e(__('string.capture_face.label.user-id')); ?></div>
                <?php echo e(Form::text('username',$user->username, [
                    'class' => 'form-control mb-3 col-md-4',
                    'readonly' => 'true',
                ])); ?>

                <?php echo e(Form::hidden('user_id', $user->id)); ?>

                <?php echo e(Form::hidden('is_edit', !empty($faceImage) ? 1 : 0)); ?>

            </div>
            <div class="form-group row">
                <div class="mb-3 col-md-1" style="display:flex; align-items:center; justify-content:right;"><?php echo e(__('string.capture_face.label.user-name')); ?></div>
                <?php echo e(Form::text('username',$user->name, [
                    'class' => 'form-control mb-3 col-md-4',
                    'readonly' => 'true',
                ])); ?>

                <?php echo e(Form::hidden('user_id', $user->id)); ?>

                <?php echo e(Form::hidden('is_edit', !empty($faceImage) ? 1 : 0)); ?>

            </div>
            <div class="row mt-4">
                <!-- <h4 class="text-center mb-3"><?php echo e(__('string.capture_face.label.image')); ?></h4> -->
                <!-- <?php if((int)$user->id  > 1): ?> -->
                    
                <div class="image-container">
                    <div class="image-box"> 
                        <img alt="image_register"    
                            src="<?php echo e(Storage::url('/images/face-capture/' . $user->id . '/left.png')); ?>">
                    </div>
                    <div class="image-box">
                        <img alt="image_register"    
                            src="<?php echo e(Storage::url('/images/face-capture/' . $user->id . '/center.png')); ?>">
                    </div>
                    <div class="image-box">
                        <img alt="image_register"             
                            src="<?php echo e(Storage::url('/images/face-capture/' . $user->id . '/right.png')); ?>">
                    </div>          
                <!-- <?php endif; ?> -->
                    
                <!-- </div>
                <div class="col-md-6" style="max-width: 470px;">
                    <h4 class="text-center mb-3"><?php echo e(__('string.capture_face.camera-title')); ?></h4>
                    <div class="camera">
                        <div class="text-center">
                            <p class="mb-0"><?php echo e(__('string.capture_face.camera-not-found-ja')); ?></p>
                            <span><?php echo e(__('string.capture_face.camera-not-found')); ?></span>
                        </div>
                        <video id="video"></video>

                    </div>
                    <canvas id="canvas"></canvas>
                    <div class="mt-5 d-flex justify-content-center">
                        <button type="button" id="take-photo" class="btn btn-primary mr-3" disabled>
                            <?php echo e(__('string.capture_face.button.capture')); ?>

                        </button>
                        <button type="button" class="btn btn-success mr-3 submit-image">
                            <?php echo e(__('string.capture_face.button.submit')); ?>

                        </button>
                        <a href="<?php echo e(route('admin.user.index')); ?>" class="btn btn-danger">
                            <?php echo e(__('string.capture_face.button.cancel')); ?>

                        </a>
                    </div>  -->
                </div>
                <!-- <div> -->
                    <!-- <dl>
                        <dt><?php echo e(__('string.capture_face.label.explanation')); ?></dt>
                        <dd><?php echo e(__('string.capture_face.label.explanation1')); ?></dd>
                        <dd><?php echo e(__('string.capture_face.label.explanation2')); ?></dd>
                        <dd><?php echo e(__('string.capture_face.label.explanation3')); ?></dd>
                        <dd><?php echo e(__('string.capture_face.label.explanation4')); ?></dd>
                    </dl> -->
                <!-- </div> -->
            <?php echo Form::close(); ?>

            <!--row-->
        </div>
        <!--card-body-->

        <div class="result">
        </div>

    </div>
    <!--card-->
<?php $__env->stopSection(); ?>

<?php $__env->startPush('after-scripts'); ?>
    <script src="<?php echo e(mix('js/capture-face.js')); ?>"></script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('backend.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/cc-faceeye-web/resources/views/backend/user/capture_face.blade.php ENDPATH**/ ?>