<?php if($formData): ?>
    <?php $__currentLoopData = $formData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="flex flex-col gap-1.5">

            
            <label class="text-xs font-semibold text-primary-700 uppercase tracking-wide
                           <?php if($data->is_required == 'required'): ?>
                               after:content-['*'] after:ml-0.5 after:text-accent-500
                           <?php endif; ?>">
                <?php echo e(__(keyToTitle($data->name))); ?>

            </label>

            
            <?php if($data->type == 'text'): ?>
                <input type="text"
                       name="<?php echo e($data->label); ?>"
                       value="<?php echo e(old($data->label)); ?>"
                       class="form--control w-full px-4 py-3 rounded-xl border-2 border-primary-200 text-primary-900 text-sm placeholder-primary-300 focus:outline-none focus:border-primary-500 transition-colors duration-200"
                       <?php if($data->is_required == 'required'): ?> required <?php endif; ?>>

            
            <?php elseif($data->type == 'textarea'): ?>
                <textarea name="<?php echo e($data->label); ?>"
                          class="form--control w-full px-4 py-3 rounded-xl border-2 border-primary-200 text-primary-900 text-sm placeholder-primary-300 focus:outline-none focus:border-primary-500 transition-colors duration-200 resize-none"
                          rows="4"
                          <?php if($data->is_required == 'required'): ?> required <?php endif; ?>><?php echo e(old($data->label)); ?></textarea>

            
            <?php elseif($data->type == 'select'): ?>
                <select name="<?php echo e($data->label); ?>"
                        class="form--control w-full px-4 py-3 rounded-xl border-2 border-primary-200 text-primary-900 text-sm focus:outline-none focus:border-primary-500 transition-colors duration-200 bg-white"
                        <?php if($data->is_required == 'required'): ?> required <?php endif; ?>>
                    <option value=""><?php echo app('translator')->get('Select One'); ?></option>
                    <?php $__currentLoopData = $data->options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($item); ?>" <?php if($item == old($data->label)): echo 'selected'; endif; ?>><?php echo e(__($item)); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>

            
            <?php elseif($data->type == 'checkbox'): ?>
                <div class="flex flex-col gap-2 mt-1">
                    <?php $__currentLoopData = $data->options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <label for="<?php echo e($data->label); ?>_<?php echo e(titleToKey($option)); ?>"
                               class="flex items-center gap-2.5 cursor-pointer group">
                            <input type="checkbox"
                                   name="<?php echo e($data->label); ?>[]"
                                   value="<?php echo e($option); ?>"
                                   id="<?php echo e($data->label); ?>_<?php echo e(titleToKey($option)); ?>"
                                   class="w-4 h-4 rounded border-2 border-primary-300 text-primary-700 accent-primary-700 focus:ring-primary-500 cursor-pointer">
                            <span class="text-sm text-primary-800 group-hover:text-primary-600 transition-colors duration-150">
                                <?php echo e($option); ?>

                            </span>
                        </label>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>

            
            <?php elseif($data->type == 'radio'): ?>
                <div class="flex flex-col gap-2 mt-1">
                    <?php $__currentLoopData = $data->options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <label for="<?php echo e($data->label); ?>_<?php echo e(titleToKey($option)); ?>"
                               class="flex items-center gap-2.5 cursor-pointer group">
                            <input type="radio"
                                   name="<?php echo e($data->label); ?>"
                                   value="<?php echo e($option); ?>"
                                   id="<?php echo e($data->label); ?>_<?php echo e(titleToKey($option)); ?>"
                                   class="w-4 h-4 border-2 border-primary-300 text-primary-700 accent-primary-700 focus:ring-primary-500 cursor-pointer"
                                   <?php if($option == old($data->label)): echo 'checked'; endif; ?>>
                            <span class="text-sm text-primary-800 group-hover:text-primary-600 transition-colors duration-150">
                                <?php echo e($option); ?>

                            </span>
                        </label>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>

            
            <?php elseif($data->type == 'file'): ?>
                <input type="file"
                       name="<?php echo e($data->label); ?>"
                       class="form--control w-full text-sm text-primary-500
                              file:mr-3 file:py-2 file:px-4 file:rounded-lg
                              file:border-2 file:border-primary-200 file:text-xs
                              file:font-semibold file:text-primary-700 file:bg-primary-50
                              hover:file:bg-primary-100 file:transition-colors file:duration-200 file:cursor-pointer"
                       accept="<?php $__currentLoopData = explode(',', $data->extensions); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ext): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>.<?php echo e($ext); ?>, <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>"
                       <?php if($data->is_required == 'required'): ?> required <?php endif; ?>>
                <p class="text-xs text-primary-400 mt-0.5">
                    <?php echo app('translator')->get('Supported mimes'); ?>: <span class="font-medium text-primary-600"><?php echo e($data->extensions); ?></span>
                </p>

            <?php endif; ?>
        </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?><?php /**PATH C:\laragon\www\itrevosbank\core\resources\views/components/viser-form.blade.php ENDPATH**/ ?>