<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex items-center justify-between">
            <h2 class="font-semibold text-xl text-gray-800 leading-tight">License Details</h2>
            <div class="flex gap-2">
                <a href="<?php echo e(route('licenses.edit', $license)); ?>" class="inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-md font-semibold text-xs text-gray-700 uppercase tracking-widest hover:bg-gray-50">
                    Edit
                </a>
                <form method="POST" action="<?php echo e(route('licenses.destroy', $license)); ?>" onsubmit="return confirm('Delete this license and all its activations? This cannot be undone.');">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('DELETE'); ?>
                    <button type="submit" class="inline-flex items-center px-4 py-2 bg-red-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-red-700">
                        Delete
                    </button>
                </form>
            </div>
        </div>
     <?php $__env->endSlot(); ?>

    <div class="py-12">
        <div class="max-w-4xl mx-auto sm:px-6 lg:px-8 space-y-6">
            <?php if(session('status')): ?>
                <div class="bg-green-50 border border-green-200 text-green-800 text-sm rounded-md p-4">
                    <?php echo e(session('status')); ?>

                </div>
            <?php endif; ?>

            <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg p-6 space-y-4">
                <div class="flex items-center justify-between">
                    <div>
                        <div class="text-xs font-medium text-gray-500 uppercase tracking-wide">License Key</div>
                        <div class="mt-1 font-mono text-lg text-gray-900" id="license-key"><?php echo e($license->key); ?></div>
                    </div>
                    <?php if (isset($component)) { $__componentOriginalc92656839606fe41cc6c7bb071bbe9f9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalc92656839606fe41cc6c7bb071bbe9f9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.license-status-badge','data' => ['status' => $license->isExpired() ? 'expired' : $license->status]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('license-status-badge'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['status' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($license->isExpired() ? 'expired' : $license->status)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalc92656839606fe41cc6c7bb071bbe9f9)): ?>
<?php $attributes = $__attributesOriginalc92656839606fe41cc6c7bb071bbe9f9; ?>
<?php unset($__attributesOriginalc92656839606fe41cc6c7bb071bbe9f9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc92656839606fe41cc6c7bb071bbe9f9)): ?>
<?php $component = $__componentOriginalc92656839606fe41cc6c7bb071bbe9f9; ?>
<?php unset($__componentOriginalc92656839606fe41cc6c7bb071bbe9f9); ?>
<?php endif; ?>
                </div>

                <div class="grid grid-cols-2 sm:grid-cols-4 gap-4 pt-4 border-t border-gray-100">
                    <div>
                        <div class="text-xs font-medium text-gray-500 uppercase tracking-wide">Customer</div>
                        <div class="mt-1 text-sm text-gray-900"><?php echo e($license->customer_name ?: '—'); ?></div>
                        <div class="text-xs text-gray-400"><?php echo e($license->customer_email); ?></div>
                    </div>
                    <div>
                        <div class="text-xs font-medium text-gray-500 uppercase tracking-wide">Activations</div>
                        <div class="mt-1 text-sm text-gray-900"><?php echo e($license->activations->count()); ?> / <?php echo e($license->max_activations); ?></div>
                    </div>
                    <div>
                        <div class="text-xs font-medium text-gray-500 uppercase tracking-wide">Expires</div>
                        <div class="mt-1 text-sm text-gray-900"><?php echo e($license->expires_at?->format('Y-m-d') ?? 'Never'); ?></div>
                    </div>
                    <div>
                        <div class="text-xs font-medium text-gray-500 uppercase tracking-wide">Created</div>
                        <div class="mt-1 text-sm text-gray-900"><?php echo e($license->created_at->format('Y-m-d')); ?></div>
                    </div>
                </div>

                <div class="pt-4 border-t border-gray-100">
                    <div class="text-xs font-medium text-gray-500 uppercase tracking-wide mb-2">Features</div>
                    <div class="flex flex-wrap gap-2">
                        <?php $__currentLoopData = $license->resolvedFeatures(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $feature => $enabled): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium <?php echo e($enabled ? 'bg-green-100 text-green-800' : 'bg-gray-100 text-gray-500 line-through'); ?>">
                                <?php echo e(ucwords(str_replace('_', ' ', $feature))); ?>

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

                <?php if($license->notes): ?>
                    <div class="pt-4 border-t border-gray-100">
                        <div class="text-xs font-medium text-gray-500 uppercase tracking-wide mb-1">Notes</div>
                        <p class="text-sm text-gray-700 whitespace-pre-line"><?php echo e($license->notes); ?></p>
                    </div>
                <?php endif; ?>
            </div>

            <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
                <div class="px-6 py-4 border-b border-gray-100 font-semibold text-gray-800 text-sm">
                    Activated Sites
                </div>
                <table class="min-w-full divide-y divide-gray-200">
                    <thead class="bg-gray-50">
                        <tr>
                            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Domain</th>
                            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Plugin / WP Version</th>
                            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Activated</th>
                            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Last Checked</th>
                            <th class="px-6 py-3"></th>
                        </tr>
                    </thead>
                    <tbody class="bg-white divide-y divide-gray-200">
                        <?php $__empty_1 = true; $__currentLoopData = $license->activations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $activation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
                                    <?php echo e($activation->domain); ?>

                                    <?php if($activation->site_url): ?>
                                        <div class="text-xs text-gray-400"><?php echo e($activation->site_url); ?></div>
                                    <?php endif; ?>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">
                                    <?php echo e($activation->plugin_version ?: '—'); ?> / <?php echo e($activation->wp_version ?: '—'); ?>

                                </td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">
                                    <?php echo e($activation->created_at->format('Y-m-d H:i')); ?>

                                </td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-700">
                                    <?php echo e($activation->last_checked_at?->diffForHumans() ?? 'Never'); ?>

                                </td>
                                <td class="px-6 py-4 whitespace-nowrap text-right text-sm">
                                    <form method="POST" action="<?php echo e(route('activations.destroy', $activation)); ?>" onsubmit="return confirm('Revoke this site activation? It will need to reactivate the license.');">
                                        <?php echo csrf_field(); ?>
                                        <?php echo method_field('DELETE'); ?>
                                        <button type="submit" class="text-red-600 hover:text-red-900">Revoke</button>
                                    </form>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td colspan="5" class="px-6 py-8 text-center text-sm text-gray-500">
                                    No sites have activated this license yet.
                                </td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH D:\laragon\www\crawl-naut\resources\views/licenses/show.blade.php ENDPATH**/ ?>