<div>
    <?php
$__split = function ($name, $params = []) {
    return [$name, $params];
};
[$__name, $__params] = $__split('components.clean-header', ['title' => 'Crea una nueva licencia']);

$key = null;

$key ??= \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::generateKey('lw-1124522477-0', null);

$__html = app('livewire')->mount($__name, $__params, $key);

echo $__html;

unset($__html);
unset($__name);
unset($__params);
unset($__split);
if (isset($__slots)) unset($__slots);
?>

    <div class="w-full px-20 pb-4">
        <div class="mx-auto max-w-3xl sm:px-6 lg:px-8">
            <div class="w-full flex flex-wrap items-center justify-center mt-8 rounded-lg px-8 py-12">
                <div class="w-full flex items-center justify-center flex-col">
                    <h1 class="text-4xl font-bold mb-6">¡Licencia generada!</h1>

                    
                    <div class="mb-8">
                        <img src="<?php echo e(Storage::url('images_static/like_hand.svg')); ?>" alt="Licencia generada" class="w-48 h-48">
                    </div>

                    
                    <div class="w-full mb-8">
                        <label class="block text-sm font-medium text-gray-700 mb-2">Licencia generada</label>
                        <div class="flex items-center gap-2" x-data="{
                            token: <?php echo \Illuminate\Support\Js::from($licenseToken->token ?? 'TOKEN_NO_DISPONIBLE')->toHtml() ?>,
                            isVisible: false,
                            copied: false,
                            get displayedToken() {
                                if (this.isVisible) {
                                    return this.token;
                                }
                                return this.token.replace(/[^-_]/g, '*');
                            },
                            toggleVisibility() {
                                this.isVisible = !this.isVisible;
                            },
                            async copyToClipboard() {
                                try {
                                    await navigator.clipboard.writeText(this.token);
                                    this.copied = true;
                                    setTimeout(() => {
                                        this.copied = false;
                                    }, 2000);
                                } catch (err) {
                                    console.error('Error al copiar:', err);
                                }
                            }
                        }">
                            <input type="text"
                                x-model="displayedToken"
                                readonly
                                id="license-token-input"
                                class="flex-1 rounded-lg border border-gray-300 px-4 py-2 font-mono text-sm bg-gray-50">
                            <button type="button" @click="toggleVisibility()"
                                class="p-2 border border-gray-300 rounded-lg hover:bg-gray-100">
                                <svg x-show="!isVisible" class="w-5 h-5 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path>
                                </svg>
                                <svg x-show="isVisible" class="w-5 h-5 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"></path>
                                </svg>
                            </button>
                            <button type="button" @click="copyToClipboard()"
                                class="p-2 border border-gray-300 rounded-lg hover:bg-gray-100"
                                title="Copiar token">
                                <svg x-show="!copied" class="w-5 h-5 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path>
                                </svg>
                                <svg x-cloak x-show="copied" class="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
                                </svg>
                            </button>
                        </div>
                    </div>

                    
                    <div class="w-full flex items-center justify-center gap-4 mt-8">
                        <a href="<?php echo e(route('license_tokens.create')); ?>"
                            class="bg-white hover:bg-gray-100 border border-gray-300 text-gray-700 px-6 py-2 rounded-lg">
                            Crear uno nuevo
                        </a>
                        <a href="<?php echo e(route('dashboard')); ?>"
                            class="bg-3ip hover:bg-3ip-light text-white px-6 py-2 rounded-lg">
                            Ir al dashboard
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div><?php /**PATH /var/www/html/resources/views/livewire/license-tokens/components/license-success.blade.php ENDPATH**/ ?>