<form action="<?php echo e(route('dashboard.job-descriptions.export', [$jd->id, 'pdf'])); ?>" method="POST" x-data="{ loading: false }"
    @submit="loading = true; setTimeout(() => loading = false, 1000)">

    <?php echo csrf_field(); ?>

    <div>
        <button type="submit" :disabled="loading"
            class="w-full inline-flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium text-gray-700 border border-gray-200 hover:bg-gray-50 transition-colors disabled:opacity-70 disabled:cursor-not-allowed">

            <svg x-show="!loading" class="w-4 h-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                    d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
            </svg>

            <svg x-show="loading" class="w-4 h-4 animate-spin text-gray-500" fill="none" viewBox="0 0 24 24">
                <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4">
                </circle>
                <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"></path>
            </svg>

            <span x-text="loading ? 'Exporting...' : 'Export as PDF'"></span>
        </button>
    </div>

</form>
<?php /**PATH /var/www/ratemypay_dev/resources/views/partials/export_pdf.blade.php ENDPATH**/ ?>