

<?php $__env->startSection('content'); ?>
<div class="max-w-2xl mx-auto">
    <div class="bg-white dark:bg-gray-800 rounded-fluid shadow-sm border border-gray-100 dark:border-gray-700 p-fluid">
        <div class="flex items-center justify-between mb-fluid">
            <h2 class="text-fluid-xl font-bold text-gray-800 dark:text-gray-100">Edit License</h2>
            <a href="<?php echo e(route('licenses.show', $license->id)); ?>" class="p-2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors">
                <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
                </svg>
            </a>
        </div>

        <form method="POST" action="<?php echo e(route('licenses.update', $license->id)); ?>" class="space-y-fluid">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>

            <div>
                <label class="block text-fluid-sm font-medium text-gray-700 dark:text-gray-300 mb-fluid-sm">License Key</label>
                <code class="block w-full px-4 py-2 border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 rounded-lg text-gray-500 dark:text-gray-400 font-mono text-fluid-base"><?php echo e($license->key); ?></code>
            </div>

            <div class="grid grid-cols-1 sm:grid-cols-2 gap-fluid">
                <div>
                    <label for="name" class="block text-fluid-sm font-medium text-gray-700 dark:text-gray-300 mb-fluid-sm">Customer Name</label>
                    <input type="text" name="name" id="name" value="<?php echo e(old('name', $license->name)); ?>" 
                        class="w-full px-4 py-2 border border-gray-200 dark:border-gray-600 dark:bg-gray-700 dark:text-white rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent text-fluid-base"
                        placeholder="John Doe">
                </div>

                <div>
                    <label for="email" class="block text-fluid-sm font-medium text-gray-700 dark:text-gray-300 mb-fluid-sm">Email Address</label>
                    <input type="email" name="email" id="email" value="<?php echo e(old('email', $license->email)); ?>" 
                        class="w-full px-4 py-2 border border-gray-200 dark:border-gray-600 dark:bg-gray-700 dark:text-white rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent text-fluid-base"
                        placeholder="john@example.com">
                </div>
            </div>

            <div class="grid grid-cols-1 sm:grid-cols-2 gap-fluid">
                <div>
                    <label for="max_devices" class="block text-fluid-sm font-medium text-gray-700 dark:text-gray-300 mb-fluid-sm">Max Devices</label>
                    <input type="number" name="max_devices" id="max_devices" value="<?php echo e(old('max_devices', $license->max_devices)); ?>" min="1" max="100"
                        class="w-full px-4 py-2 border border-gray-200 dark:border-gray-600 dark:bg-gray-700 dark:text-white rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent text-fluid-base">
                </div>

                <div>
                    <label class="block text-fluid-sm font-medium text-gray-700 dark:text-gray-300 mb-fluid-sm">Status</label>
                    <div class="px-4 py-2 border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 rounded-lg">
                        <?php
                            $statusColors = [
                                'active' => 'text-green-600 dark:text-green-400',
                                'expired' => 'text-red-600 dark:text-red-400',
                                'suspended' => 'text-yellow-600 dark:text-yellow-400',
                                'revoked' => 'text-gray-600 dark:text-gray-400',
                            ];
                        ?>
                        <span class="font-medium <?php echo e($statusColors[$license->status] ?? 'text-gray-600 dark:text-gray-400'); ?>">
                            <?php echo e(ucfirst($license->status)); ?>

                        </span>
                    </div>
                    <p class="text-fluid-xs text-gray-500 dark:text-gray-400 mt-1">Use the status button on the license details page to change status</p>
                </div>
            </div>

            <div>
                <label for="note" class="block text-fluid-sm font-medium text-gray-700 dark:text-gray-300 mb-fluid-sm">Note (Optional)</label>
                <textarea name="note" id="note" rows="3"
                    class="w-full px-4 py-2 border border-gray-200 dark:border-gray-600 dark:bg-gray-700 dark:text-white rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent text-fluid-base"
                    placeholder="Any additional notes..."><?php echo e(old('note', $license->note)); ?></textarea>
            </div>

            <div class="flex items-center justify-end gap-fluid pt-4">
                <a href="<?php echo e(route('licenses.show', $license->id)); ?>" class="px-6 py-2 border border-gray-200 dark:border-gray-600 text-gray-600 dark:text-gray-300 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors text-fluid-base">
                    Cancel
                </a>
                <button type="submit" class="px-6 py-2 gradient-bg text-white rounded-lg hover:opacity-90 transition-opacity text-fluid-base">
                    Save Changes
                </button>
            </div>
        </form>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\license-panel\resources\views/licenses/edit.blade.php ENDPATH**/ ?>