
<?php
    $sincronizado = $environment->refresh_at !== null;
    // En Carbon 3 `diffInDays` va CON signo: el sujeto tiene que ser la fecha pasada o
    // sale negativo. Ver MGR-030.
    $diasSinSincronizar = $sincronizado ? (int) $environment->refresh_at->diffInDays(now()) : null;

    $soporte = $environment->soporteVigente;
    $soporteCaducado = $soporte !== null && $soporte->haCaducado();
    $soporteProximo = $soporte !== null && ! $soporteCaducado && $soporte->diasRestantes() < 30;

    // Mismos umbrales que el Dashboard y que el resumen de la cabecera: dos criterios
    // distintos para lo mismo acaban contradiciéndose en pantalla.
    $franja = match (true) {
        $sincronizado && $diasSinSincronizar >= 7 => 'var(--danger-500)',
        $soporteCaducado => 'var(--danger-500)',
        $sincronizado && $diasSinSincronizar >= 3 => 'var(--warning-500)',
        $environment->lastversion !== null => 'var(--warning-500)',
        default => 'transparent',
    };

    // La paleta vive en el modelo: la comparten esta etiqueta, la de la ficha y los
    // botones de la barra de filtros, que antes eran tres listas distintas.
    [$envColor, $envFondo] = \App\Models\Environments\Environment::colorDeEnv($environment->env);

    $productos = $environment->licenseToken
        ? $environment->licenseToken->products->unique('id')
        : collect();
    // **La atenuación de un entorno apagado va por columnas, no en la fila.**
    // `opacity` menor que 1 crea un contexto de apilamiento nuevo, así que el `z-50` del
    // menú de acciones dejaba de valer contra el resto de la página: el desplegable se
    // pintaba POR DEBAJO de las filas siguientes. Y solo pasaba en los entornos
    // inactivos, porque eran los únicos con opacidad.
    //
    // Atenuando solo las columnas de información, la de acciones se queda en el contexto
    // de apilamiento de la página y el menú vuelve a flotar sobre todo. El entorno
    // apagado se sigue viendo apagado, que es lo que se quería.
    $atenuado = $environment->active ? '' : 'opacity:0.6;';
?>

<div class="env-grid items-center border-b px-5 py-3 transition-colors lg:pl-[17px]"
     style="border-color:var(--divider); border-left:3px solid <?php echo e($franja); ?>;"
     onmouseover="this.style.background='var(--surface-alt)'"
     onmouseout="this.style.background=''">

    
    <div class="min-w-0" style="<?php echo e($atenuado); ?>">
        <div class="flex min-w-0 items-center gap-2">
            
            <a href="<?php echo e(route('environments.show', $environment)); ?>" wire:navigate
               class="truncate text-sm font-semibold hover:underline" style="color:var(--text-strong);">
                <?php echo e($environment->name); ?>

            </a>

            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if (! ($environment->active)): ?>
                <span class="flex-none rounded px-[7px] py-px text-[10.5px] font-semibold"
                      style="color:var(--neutral-600); background:var(--surface-sunken);">
                    Inactivo
                </span>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->env): ?>
                <span class="flex-none rounded px-[7px] py-px text-[10.5px] font-semibold"
                      style="color:<?php echo e($envColor); ?>; background:<?php echo e($envFondo); ?>;">
                    <?php echo e($environment->env); ?>

                </span>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>

        <div class="mt-0.5 flex min-w-0 items-center gap-1.5">
            <a href="<?php echo e($environment->domain); ?>" target="_blank" rel="noopener"
               class="truncate text-[12.5px] hover:underline" style="color:var(--text-link);">
                <?php echo e($environment->domain); ?>

            </a>
            <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="var(--text-subtle)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-none"><path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/></svg>
        </div>

        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if (! ($environment->active)): ?>
            
            <div class="mt-px truncate text-[11.5px]" style="color:var(--danger-500);"
                 title="Su Moodle recibe «Entorno inactivo» (403) en todas las acciones">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->deactivated_at): ?>
                    apagado desde <?php echo e($environment->deactivated_at->format('d/m/Y')); ?>

                <?php else: ?>
                    apagado
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->deactivation_reason): ?>
                    · «<?php echo e($environment->deactivation_reason); ?>»
                <?php else: ?>
                    · sin motivo anotado
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->deactivatedBy): ?>
                    · <?php echo e($environment->deactivatedBy->name); ?>

                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </div>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($showClient): ?>
            
            <div class="mt-px truncate text-xs" style="color:var(--text-muted);">
                <?php echo e($environment->client?->name ?? '— Cliente borrado —'); ?>

            </div>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
    </div>

    
    <div class="flex min-w-0 items-center gap-2.5" style="<?php echo e($atenuado); ?>">

        
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->type?->image_url): ?>
            <span class="flex h-[34px] w-[34px] flex-none items-center justify-center rounded-[10px] border"
                  title="<?php echo e($environment->type->name); ?>"
                  style="border-color:var(--border-subtle); background:var(--surface-page);">
                <img src="<?php echo e($environment->type->image_url); ?>"
                     alt="<?php echo e($environment->type->name); ?>"
                     class="h-[23px] w-[23px] object-contain"
                     loading="lazy">
            </span>
        <?php elseif($environment->type): ?>
            
            <span class="flex h-[34px] w-[34px] flex-none items-center justify-center rounded-[10px] border text-[10px] font-bold uppercase"
                  title="<?php echo e($environment->type->name); ?>"
                  style="border-color:var(--border-subtle); background:var(--surface-page); color:var(--text-subtle);">
                <?php echo e(mb_substr($environment->type->name, 0, 3)); ?>

            </span>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

      <div class="flex min-w-0 flex-col gap-[2px]">
        <div class="flex flex-wrap items-center gap-1.5">

            
            <span class="text-[14px] font-bold" style="color:var(--text-strong);"
                  title="<?php echo e(\App\Support\VersionDeMoodle::detalle($environment)); ?>">
                <?php echo e(\App\Support\VersionDeMoodle::etiqueta($environment)); ?>

            </span>

            
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->lastversion): ?>
                <span title="Actualización mayor disponible" class="text-[11px] font-semibold"
                      style="color:var(--danger-500);">
                    &rarr; <?php echo e($environment->lastversion); ?>

                </span>
            <?php elseif($environment->lastminor): ?>
                <span title="Actualización menor disponible" class="text-[11px] font-semibold"
                      style="color:var(--warning-500);">
                    &rarr; <?php echo e($environment->lastminor); ?>

                </span>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

        </div>

        
        <div class="flex flex-wrap items-center gap-1">
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(($environment->missing_plugins_count ?? 0) > 0): ?>
                <?php $ausentes = (int) $environment->missing_plugins_count; ?>
                
                <a href="<?php echo e(route('environments.plugins.index', $environment)); ?>" wire:navigate
                   data-tip="<?php echo e($ausentes); ?> <?php echo e($ausentes === 1 ? 'plugin registrado en Moodle cuyos ficheros no están' : 'plugins registrados en Moodle cuyos ficheros no están'); ?> en el disco"
                   class="tip inline-flex items-center gap-[3px] rounded px-1 py-px text-[11px] font-bold"
                   style="color:var(--danger-500); background:var(--danger-50);">
                    <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z"/><path d="M13 2v7h7"/><path d="m9.5 12.5 5 5"/><path d="m14.5 12.5-5 5"/></svg>
                    <?php echo e($ausentes); ?>

                </a>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(($environment->outdated_plugins_count ?? 0) > 0): ?>
                
                <a href="<?php echo e(route('environments.plugins.index', $environment)); ?>" wire:navigate
                   data-tip="<?php echo e($environment->outdated_plugins_count); ?> <?php echo e($environment->outdated_plugins_count === 1 ? 'plugin con actualización disponible' : 'plugins con actualización disponible'); ?>"
                   class="tip inline-flex items-center gap-[3px] rounded px-1 py-px text-[11px] font-bold"
                   style="color:var(--warning-500); background:var(--warning-50);">
                    <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>
                    <?php echo e($environment->outdated_plugins_count); ?>

                </a>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>
      </div>

    </div>

    
    <div class="flex min-w-0 flex-col items-start gap-1" style="<?php echo e($atenuado); ?>">
        <div class="flex min-w-0 flex-wrap items-center gap-1.5">
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(! $sincronizado): ?>
                
                <span class="min-w-0 text-xs" style="color:var(--text-subtle);"
                      title="Este sitio no ha sincronizado nunca: es un alta sin terminar">
                    No sincronizado
                </span>
            <?php elseif($diasSinSincronizar >= 3): ?>
                <span class="text-xs font-semibold"
                      style="color:<?php echo e($diasSinSincronizar >= 7 ? 'var(--danger-500)' : 'var(--warning-500)'); ?>;"
                      title="Última señal: <?php echo e($environment->refresh_at->format('d/m/Y H:i:s')); ?>">
                    &#9888; Sin señal · <?php echo e($diasSinSincronizar); ?> día(s)
                </span>
            <?php else: ?>
                <span class="min-w-0 text-xs" style="color:var(--text-muted);"
                      title="<?php echo e($environment->refresh_at->format('d/m/Y H:i:s')); ?>">
                    Sincronizado <?php echo e($environment->refresh_at->diffForHumans()); ?>

                </span>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.environments.refresh')): ?>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->puedeSincronizar): ?>
                    <button type="button" wire:click="sincronizar"
                            wire:loading.attr="disabled" wire:target="sincronizar"
                            data-tip="Sincronizar ahora"
                            class="tip flex flex-none rounded-md border px-[5px] py-[3px] transition-colors disabled:opacity-60"
                            style="border-color:var(--border-default); background:var(--surface-page); color:var(--text-subtle);">
                        <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
                             wire:loading.class="animate-spin" wire:target="sincronizar"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/></svg>
                    </button>
                <?php elseif(auth()->user()?->can('admin.environments.edit')): ?>
                    
                    <button type="button" wire:click="abrirConexionMoodle"
                            data-tip="Conectar: guardar el token de servicios web de este Moodle"
                            class="tip flex flex-none rounded-md border-none px-[5px] py-[3px] text-white transition-colors"
                            style="background:var(--orange-500);"
                            onmouseover="this.style.background='var(--orange-600)'"
                            onmouseout="this.style.background='var(--orange-500)'">
                        <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><path d="M8 12h8"/></svg>
                    </button>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            <?php endif; ?>
        </div>

    </div>

    
    <div class="flex min-w-0 flex-col gap-[3px]" style="<?php echo e($atenuado); ?>">
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->licenseToken): ?>
            <div class="flex min-w-0 items-center gap-1.5"
                 x-data="{ copiado: false }">
                
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->user()?->can('admin.license-tokens.show')): ?>
                    <a href="<?php echo e(route('license_tokens.show', $environment->licenseToken)); ?>" wire:navigate
                       class="truncate rounded px-2 py-px font-mono text-[11.5px] hover:underline"
                       style="color:var(--text-link); background:var(--surface-sunken);"
                       title="Ver la licencia <?php echo e($environment->licenseToken->name ?: 'sin nombre'); ?>. El token completo está en su ficha.">
                        <?php echo e($environment->licenseToken->token_corto); ?>

                    </a>
                <?php else: ?>
                    <span class="truncate rounded px-2 py-px font-mono text-[11.5px]"
                          style="color:var(--text-body); background:var(--surface-sunken);"
                          title="Licencia <?php echo e($environment->licenseToken->name ?: 'sin nombre'); ?>. El token completo no se enseña aquí.">
                        <?php echo e($environment->licenseToken->token_corto); ?>

                    </span>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                <button type="button" title="Copiar token"
                        @click="copiarAlPortapapeles('<?php echo e($environment->licenseToken->token); ?>').then(ok => { if (ok) { copiado = true; setTimeout(() => copiado = false, 1500) } })"
                        class="flex border-none bg-transparent p-0.5" style="color:var(--text-subtle);">
                    <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>
                </button>
                <span x-show="copiado" x-cloak class="text-[11px] font-semibold" style="color:var(--success-500);">
                    Copiado
                </span>
            </div>
        <?php else: ?>
            
            <div class="flex items-center gap-1.5">
                <span class="text-xs font-semibold" style="color:var(--warning-500);">Sin licencia</span>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($client): ?>
                    <a href="<?php echo e(route('license_tokens.associate-license', [$client, $environment])); ?>"
                       class="text-xs font-semibold hover:underline" style="color:var(--text-link);">
                        Asociar
                    </a>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </div>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

        
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($soporte): ?>
            
            <div class="flex min-w-0 items-center gap-1.5">
                <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-none"
                     style="color:<?php echo e($soporteCaducado ? 'var(--danger-500)' : ($soporteProximo ? 'var(--warning-500)' : 'var(--text-subtle)')); ?>;"><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/></svg>

                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($soporteCaducado): ?>
                    <span class="truncate text-[11.5px] font-semibold" style="color:var(--danger-500);">
                        Soporte caducado el <?php echo e($soporte->end_at->format('d/m/Y')); ?>

                    </span>
                <?php elseif($soporteProximo): ?>
                    <span class="truncate text-[11.5px] font-semibold" style="color:var(--warning-500);">
                        Soporte: quedan <?php echo e($soporte->diasRestantes()); ?> día(s) (<?php echo e($soporte->end_at->format('d/m/Y')); ?>)
                    </span>
                <?php else: ?>
                    <span class="truncate text-[11.5px]" style="color:var(--text-muted);">
                        <?php echo e($soporte->support?->name ?? 'Soporte'); ?> hasta el <?php echo e($soporte->end_at->format('d/m/Y')); ?>

                    </span>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </div>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
    </div>

    
    <div style="<?php echo e($atenuado); ?>">
        <?php if (isset($component)) { $__componentOriginal8685aa302c3ddaba5d15945e3d14b127 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8685aa302c3ddaba5d15945e3d14b127 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.product-icons','data' => ['products' => $productos]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('product-icons'); ?>
<?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(['products' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($productos)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8685aa302c3ddaba5d15945e3d14b127)): ?>
<?php $attributes = $__attributesOriginal8685aa302c3ddaba5d15945e3d14b127; ?>
<?php unset($__attributesOriginal8685aa302c3ddaba5d15945e3d14b127); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8685aa302c3ddaba5d15945e3d14b127)): ?>
<?php $component = $__componentOriginal8685aa302c3ddaba5d15945e3d14b127; ?>
<?php unset($__componentOriginal8685aa302c3ddaba5d15945e3d14b127); ?>
<?php endif; ?>
    </div>

    
    <div class="flex items-center justify-end gap-2">
        
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->review_flagged_at): ?>
            <?php $nivel = \App\Support\RevisionDeEntorno::nivel($environment->review_level); ?>
            <button type="button" wire:click="abrirRevision"
                    
                    data-tip="<?php echo e($nivel['etiqueta']); ?> · anotado por <?php echo e($environment->reviewFlaggedBy?->name ?? 'alguien que ya no está'); ?> <?php echo e($environment->review_flagged_at->diffForHumans()); ?>"
                    class="tip flex flex-none items-center gap-1.5 rounded-lg border px-2 py-1.5 text-[11.5px] font-bold transition-colors"
                    style="border-color:<?php echo e($nivel['color']); ?>; background:<?php echo e($nivel['fondo']); ?>; color:<?php echo e($nivel['color']); ?>;">
                <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 9v4"/><path d="M12 17h.01"/><path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/></svg>
                <?php echo e($nivel['etiqueta']); ?>

            </button>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

        
        <a href="<?php echo e(route('environments.show', $environment)); ?>" wire:navigate
           data-tip="Ver el entorno"
           class="tip flex flex-none rounded-lg border px-2 py-1.5 transition-colors"
           style="border-color:var(--border-default); background:var(--surface-page); color:var(--text-body);"
           onmouseover="this.style.borderColor='var(--border-strong)'; this.style.background='var(--surface-alt)'"
           onmouseout="this.style.borderColor='var(--border-default)'; this.style.background='var(--surface-page)'">
            <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></svg>
        </a>

        <?php if (isset($component)) { $__componentOriginaldf8083d4a852c446488d8d384bbc7cbe = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginaldf8083d4a852c446488d8d384bbc7cbe = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown','data' => ['align' => 'right','width' => '48']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown'); ?>
<?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(['align' => 'right','width' => '48']); ?>
             <?php $__env->slot('trigger', null, []); ?> 
                <button class="flex rounded-lg border px-2 py-1.5 transition-colors"
                        style="border-color:var(--border-default); background:var(--surface-page); color:var(--text-body);">
                    <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
                </button>
             <?php $__env->endSlot(); ?>

             <?php $__env->slot('content', null, []); ?> 
                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.environments.edit')): ?>
                    <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => ['href' => route('environments.edit', $environment),'wire:navigate' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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(['href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('environments.edit', $environment)),'wire:navigate' => true]); ?>
                        Configurar
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
                <?php endif; ?>

                
                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.datas.environment')): ?>
                    <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => ['href' => route('environments.uso', $environment),'wire:navigate' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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(['href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('environments.uso', $environment)),'wire:navigate' => true]); ?>
                        Uso del entorno
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
                <?php endif; ?>

                <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => ['href' => route('environments.plugins.index', $environment),'wire:navigate' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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(['href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('environments.plugins.index', $environment)),'wire:navigate' => true]); ?>
                    Ver plugins
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>

                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.environments.supports.index')): ?>
                    <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => ['href' => route('environments.supports.index', $environment),'wire:navigate' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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(['href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('environments.supports.index', $environment)),'wire:navigate' => true]); ?>
                        Soportes
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
                <?php endif; ?>

                
                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.environments.review')): ?>
                    <button wire:click="abrirRevision" class="w-full text-start">
                        <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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([]); ?>
                            <?php echo e($environment->review_flagged_at ? 'Ver la observación…' : 'Marcar para revisar…'); ?>

                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
                    </button>
                <?php endif; ?>

                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.environments.edit')): ?>
                    
                    <button wire:click="abrirConexionMoodle" class="w-full text-start">
                        <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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([]); ?>Conexión con el Moodle <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
                    </button>
                <?php endif; ?>

                <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => ['href' => $environment->domain,'target' => '_blank']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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(['href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($environment->domain),'target' => '_blank']); ?>
                    Abrir sitio
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>

                
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->enlaceDeLogin()): ?>
                    <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => ['href' => $environment->enlaceDeLogin(),'target' => '_blank']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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(['href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($environment->enlaceDeLogin()),'target' => '_blank']); ?>
                        Entrar al Moodle
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->tieneLoginPropio()): ?>
                            <span class="text-[11px]" style="color:var(--text-subtle);">· enlace propio</span>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.environments.edit')): ?>
                    
                    <div class="my-1 h-px" style="background:var(--divider);"></div>
                    <button wire:click="abrirCambioDeEstado" class="w-full text-start">
                        <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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([]); ?>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->active): ?>
                                <span style="color:var(--danger-500);">Apagar entorno…</span>
                            <?php else: ?>
                                <span style="color:var(--success-500);">Encender entorno…</span>
                            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
                    </button>
                <?php endif; ?>

                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->licenseToken): ?>
                    <div class="my-1 h-px" style="background:var(--divider);"></div>

                    
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.license-tokens.show')): ?>
                        <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => ['href' => route('license_tokens.show', $environment->licenseToken),'wire:navigate' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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(['href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('license_tokens.show', $environment->licenseToken)),'wire:navigate' => true]); ?>
                            Gestionar su licencia
                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
                    <?php endif; ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.license-tokens.manage-environments')): ?>
                        <button wire:click="openDisassociateModal" class="w-full text-start">
                            <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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([]); ?>
                                <span style="color:var(--danger-500);">Desasociar licencia</span>
                             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
                        </button>
                    <?php endif; ?>
                <?php elseif($environment->client): ?>
                    
                    <div class="my-1 h-px" style="background:var(--divider);"></div>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.license-tokens.manage-environments')): ?>
                        <?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => ['href' => route('license_tokens.associate-license', [$environment->client, $environment])]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?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(['href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('license_tokens.associate-license', [$environment->client, $environment]))]); ?>
                            Asociarle una licencia
                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
                    <?php endif; ?>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
             <?php $__env->endSlot(); ?>
         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginaldf8083d4a852c446488d8d384bbc7cbe)): ?>
<?php $attributes = $__attributesOriginaldf8083d4a852c446488d8d384bbc7cbe; ?>
<?php unset($__attributesOriginaldf8083d4a852c446488d8d384bbc7cbe); ?>
<?php endif; ?>
<?php if (isset($__componentOriginaldf8083d4a852c446488d8d384bbc7cbe)): ?>
<?php $component = $__componentOriginaldf8083d4a852c446488d8d384bbc7cbe; ?>
<?php unset($__componentOriginaldf8083d4a852c446488d8d384bbc7cbe); ?>
<?php endif; ?>
    </div>
</div><?php /**PATH /var/www/html/resources/views/livewire/environments/components/environment-card.blade.php ENDPATH**/ ?>