@section('page-title', 'Generate QR Codes')
{{-- Success Message --}} @if (session()->has('message'))

{{ session('message') }}

@endif {{-- Generation Form --}}

Generate QR Codes

{{-- Quantity Input --}}

Min: 10,000 | Increment: +10,000

@error('quantity') {{ $message }} @enderror
{{-- Starting Serial Number --}}

Leave blank for auto-increment from last code

@error('startingSerial') {{ $message }} @enderror
{{-- Generation Method Toggle --}}
{{-- Generate Button --}}
{{-- Progress Section --}} @if($isGenerating || $progress > 0)

Generation Progress

{{-- Progress Bar --}}
{{ number_format($progress) }} / {{ number_format($totalQuantity) }} {{ $totalQuantity > 0 ? round(($progress / $totalQuantity) * 100) : 0 }}%
@if($progress > 0) {{ $totalQuantity > 0 ? round(($progress / $totalQuantity) * 100) : 0 }}% @endif
{{-- Status Display --}}
@if($isGenerating)
Generating codes in batches of 1,000...
@else
Generation complete!
@endif
Processing in batches of 1,000 codes for optimal performance
@if($totalQuantity > 0)
Estimated time: ~{{ ceil($totalQuantity / 1000) }} seconds
@endif
@endif