<?php $__env->startSection('title', 'Server Requirements & Permissions'); ?>

<?php $__env->startSection('content'); ?>
    <div style="margin-bottom: 1.5rem;">
        <h2 style="font-size: 1.5rem; margin-bottom: 0.3rem;">Step 1: System Requirements & Permissions</h2>
        <p style="color: var(--text-muted); font-size: 0.9rem;">Checking PHP environment, loaded modules, and directory write permissions.</p>
    </div>

    <!-- PHP Version -->
    <h4 style="margin: 1rem 0 0.5rem; font-size: 0.9rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px;">PHP Version</h4>
    <div class="check-item">
        <span>PHP >= <?php echo e($phpVersionRequired); ?> (Current: <strong><?php echo e($currentPhpVersion); ?></strong>)</span>
        <span class="status-badge <?php echo e($phpSatisfied ? 'status-pass' : 'status-fail'); ?>">
            <i class="fa-solid <?php echo e($phpSatisfied ? 'fa-check' : 'fa-xmark'); ?>"></i>
            <?php echo e($phpSatisfied ? 'Pass' : 'Fail'); ?>

        </span>
    </div>

    <!-- Required Extensions -->
    <h4 style="margin: 1.5rem 0 0.5rem; font-size: 0.9rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px;">Required PHP Extensions</h4>
    <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;">
        <?php $__currentLoopData = $requiredExtensions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ext => $loaded): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="check-item" style="margin-bottom: 0;">
                <span><?php echo e(ucfirst($ext)); ?></span>
                <span class="status-badge <?php echo e($loaded ? 'status-pass' : 'status-fail'); ?>">
                    <i class="fa-solid <?php echo e($loaded ? 'fa-check' : 'fa-xmark'); ?>"></i>
                    <?php echo e($loaded ? 'Pass' : 'Missing'); ?>

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

    <!-- Directory Permissions -->
    <h4 style="margin: 1.5rem 0 0.5rem; font-size: 0.9rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px;">Directory Permissions</h4>
    <?php $__currentLoopData = $permissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dir => $writable): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="check-item">
            <span><code><?php echo e($dir); ?></code></span>
            <span class="status-badge <?php echo e($writable ? 'status-pass' : 'status-fail'); ?>">
                <i class="fa-solid <?php echo e($writable ? 'fa-check' : 'fa-xmark'); ?>"></i>
                <?php echo e($writable ? 'Writable' : 'Not Writable'); ?>

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

    <?php if(!$allPassed): ?>
        <div class="alert-error" style="margin-top: 1.5rem;">
            <i class="fa-solid fa-triangle-exclamation"></i> Some requirements or folder permissions are missing. Please fix the items marked in red above before continuing.
        </div>
    <?php endif; ?>

    <div class="actions-row">
        <a href="<?php echo e(route('install.welcome')); ?>" class="btn btn-secondary">
            <i class="fa-solid fa-arrow-left"></i> Back
        </a>

        <div style="display: flex; gap: 10px;">
            <a href="<?php echo e(route('install.requirements')); ?>" class="btn btn-secondary">
                <i class="fa-solid fa-rotate-right"></i> Check Again
            </a>

            <?php if($allPassed): ?>
                <a href="<?php echo e(route('install.database')); ?>" class="btn btn-primary">
                    Configure Database <i class="fa-solid fa-arrow-right"></i>
                </a>
            <?php else: ?>
                <button disabled class="btn btn-primary" style="opacity: 0.5; cursor: not-allowed;">
                    Fix Issues to Proceed
                </button>
            <?php endif; ?>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('install.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\Clients\MInfosoftware\LiveApp\MyOpticals\backend\resources\views/install/requirements.blade.php ENDPATH**/ ?>