<div class="txp-flow" <?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::$currentLoop['key'] = 'service-registration-flow-'.e($packageId).''; ?>wire:key="service-registration-flow-<?php echo e($packageId); ?>">
    <div class="txp-flow__glow txp-flow__glow--one"></div>
    <div class="txp-flow__glow txp-flow__glow--two"></div>

    <div class="txp-flow__top">
        <div>
            <span class="txp-flow__eyebrow"><?php echo e($selectedPackage?->name ?? 'Selected package'); ?></span>
            <h2><?php echo e($step === 3 ? 'Documents and order' : 'Start your process'); ?><span>.</span></h2>
            <p>
                <?php echo e($step === 3
                    ? 'Upload now or create the order and send documents later through your dashboard.'
                    : 'Add your contact details so Texora can open the request and connect it to your dashboard.'); ?>

            </p>
        </div>
        <button type="button" class="txp-flow__close" @click="$dispatch('close-modal')" aria-label="Close process">
            &times;
        </button>
    </div>

    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($step == 1): ?>
        <div class="txp-flow__body">
            <div class="txp-flow__prep">
                <small>Keep ready</small>
                <div class="txp-flow__requirements">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $service?->requirements ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $req): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                        <div class="txp-flow__requirement">
                            <span>&check;</span>
                            <strong><?php echo e($req->document_name); ?></strong>
                        </div>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                        <div class="txp-flow__requirement">
                            <span>&check;</span>
                            <strong>Basic contact details</strong>
                        </div>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
            </div>

            <button type="button" wire:click="goToForm" wire:loading.attr="disabled" class="txp-flow__primary">
                <span wire:loading.remove wire:target="goToForm">Start Process</span>
                <span wire:loading wire:target="goToForm">Preparing...</span>
            </button>
        </div>

    <?php elseif($step == 2): ?>
        <form wire:submit.prevent="startProcess" class="txp-flow__body">
            <div class="txp-flow__prep">
                <small>Requirements</small>
                <div class="txp-flow__requirements">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $service?->requirements ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $req): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                        <div class="txp-flow__requirement">
                            <span>&check;</span>
                            <strong><?php echo e($req->document_name); ?></strong>
                        </div>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                        <div class="txp-flow__requirement">
                            <span>&check;</span>
                            <strong>Basic contact details</strong>
                        </div>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
            </div>

            <div class="txp-flow__grid">
                <label class="txp-flow__field">
                    <span>Full name</span>
                    <input type="text" wire:model="name" autocomplete="name" placeholder="Your full name">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?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]); ?> <em><?php echo e($message); ?></em> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </label>
                <label class="txp-flow__field">
                    <span>CNIC number</span>
                    <input type="text" wire:model="cnic" autocomplete="off" placeholder="42XXX-XXXXXXX-X">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['cnic'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <em><?php echo e($message); ?></em> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </label>
                <label class="txp-flow__field">
                    <span>Phone number</span>
                    <input type="text" wire:model="phone" autocomplete="tel" placeholder="03XXXXXXXXX">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['phone'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <em><?php echo e($message); ?></em> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </label>
                <label class="txp-flow__field">
                    <span>Email address</span>
                    <input type="email" wire:model="email" autocomplete="email" placeholder="email@example.com" <?php echo e(Auth::check() ? 'disabled' : ''); ?>>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <em><?php echo e($message); ?></em> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </label>
            </div>

            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!Auth::check()): ?>
                <div class="txp-flow__grid">
                    <label class="txp-flow__field">
                        <span>Set password</span>
                        <input type="password" wire:model="password" autocomplete="new-password" placeholder="Minimum 8 characters">
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <em><?php echo e($message); ?></em> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </label>
                    <label class="txp-flow__field">
                        <span>Confirm password</span>
                        <input type="password" wire:model="password_confirmation" autocomplete="new-password" placeholder="Repeat password">
                    </label>
                </div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($errorMessage): ?>
                <div class="txp-flow__error">
                    <?php echo e($errorMessage); ?>

                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(str_contains($errorMessage, 'sign in')): ?>
                        <a href="<?php echo e(route('login')); ?>">Login here</a>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            <div class="txp-flow__actions">
                <button type="button" class="txp-flow__secondary" @click="$dispatch('close-modal')">Cancel</button>
                <button type="submit" wire:loading.attr="disabled" wire:target="startProcess" class="txp-flow__primary">
                    <span wire:loading.remove wire:target="startProcess">Proceed</span>
                    <span wire:loading wire:target="startProcess">Checking...</span>
                </button>
            </div>
        </form>

    <?php elseif($step == 3): ?>
        <div class="txp-flow__body">
            <div class="txp-flow__grid">
                <label class="txp-flow__upload">
                    <span>CNIC copy</span>
                    <input type="file" wire:model="cnic_copy">
                    <strong><?php echo e($cnic_copy ? 'File selected' : 'Upload front/back image'); ?></strong>
                </label>
                <label class="txp-flow__upload">
                    <span>Electricity bill</span>
                    <input type="file" wire:model="electricity_bill">
                    <strong><?php echo e($electricity_bill ? 'File selected' : 'Upload recent bill'); ?></strong>
                </label>
            </div>

            <label class="txp-flow__check">
                <input type="checkbox" wire:model="upload_later">
                <span>Upload later through WhatsApp, email, or your dashboard.</span>
            </label>

            <div class="txp-flow__summary">
                <small>Package total</small>
                <strong><?php echo e($selectedPackage?->currency ?? 'PKR'); ?> <?php echo e(number_format((float) ($selectedPackage?->price ?? 0), 0)); ?></strong>
                <p>You can create the request now and complete payment from your dashboard, or continue straight to payment.</p>
            </div>

            <div class="txp-flow__actions txp-flow__actions--stack">
                <button type="button" wire:click="createOrder(false)" wire:loading.attr="disabled" wire:target="createOrder" class="txp-flow__secondary">
                    Create account and order
                </button>
                <button type="button" wire:click="createOrder(true)" wire:loading.attr="disabled" wire:target="createOrder" class="txp-flow__primary">
                    Pay and proceed
                </button>
            </div>
        </div>
    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<?php /**PATH C:\Users\User\.gemini\antigravity\scratch\texora\resources\views/livewire/frontend/service-registration-flow.blade.php ENDPATH**/ ?>