<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([

    'label' , 'name' , 'id'=> '' , 'value' , 'col' => ''
]));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter(([

    'label' , 'name' , 'id'=> '' , 'value' , 'col' => ''
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>



<div class="col-md-<?php echo e($col ? $col : '6'); ?> col-12 mb-3">
    <label class="form-label mb-2"><?php echo e($label); ?></label>

    <div class="upload-box">
        <input class="form-control image" type="file" id="<?php echo e($name .'formFile'); ?>" name="<?php echo e($name); ?>">
        <i class="fas fa-cloud-upload-alt upload-icon"></i>
        <span class="upload-text"><?php echo e(__('dashboard.click_to_upload')); ?></span>
    </div>

    <?php if($value): ?>
    <div class="preview-box form-group prev" style="position: relative;">
        <img src="<?php echo e(viewImage($value)); ?>" class="img-thumbnail preview-<?php echo e($name .'formFile'); ?>" alt="Preview">
        <button type="button" class="btn-close remove-image" data-id="<?php echo e($name .'formFile'); ?>" style="position: absolute; top: 10px; right: 10px;"></button>
    </div>
    <?php else: ?>
    <div class="preview-box form-group prev" style="display: none; position: relative;">
        <img src="" class="img-thumbnail preview-<?php echo e($name .'formFile'); ?>" alt="Preview">
        <button type="button" class="btn-close remove-image" data-id="<?php echo e($name .'formFile'); ?>" style="position: absolute; top: 10px; right: 10px;"></button>
    </div>
    <?php endif; ?>

    <?php $__errorArgs = [$name];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
        <span class="text-danger d-block mt-2">
            <small class="errorTxt"><?php echo e($message); ?></small>
        </span>
    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>

<?php /**PATH /home/takwgzfj/montsportscamp.com/resources/views/components/image.blade.php ENDPATH**/ ?>