<div>
    
    <div class="w-full flex items-center">
        <a href="<?php echo e(route('clients.index')); ?>"
            class="flex rounded-lg bg-white border border-gray-200 px-4 py-2 text-gray-700 hover:bg-gray-100 font-bold">
            <img src="<?php echo e(asset('vendor/blade-untitledui-icons/arrow-narrow-left.svg')); ?>" alt="Volver" class="w-6 h-6">
            <span class="ml-2">Volver</span>
        </a>
        <a class="flex rounded-lg bg-3ip border border-gray-200 px-4 py-2 text-white hover:bg-3ip-light font-bold ml-auto"
        href="<?php echo e(route('clients.edit', $client)); ?>">
            <img src="<?php echo e(asset('vendor/blade-untitledui-icons/pencil.svg')); ?>" alt="Editar cliente"
                class="w-6 h-6 svg-fill-white">
            <span class="ml-2">Editar cliente</span>
        </a>
        <a class="flex rounded-lg bg-3ip border border-gray-200 px-4 py-2 text-white hover:bg-3ip-light font-bold"
            href="<?php echo e(route('environments.create-from-client', $client)); ?>">
            <img src="<?php echo e(asset('vendor/blade-untitledui-icons/plus.svg')); ?>" alt="Nuevo entorno"
                class="w-6 h-6 svg-fill-white">
            <span class="ml-2">Nuevo entorno</span>
        </a>
    </div>

    
    <div
        class="w-full flex flex-wrap items-center justify-between mt-8 rounded-lg bg-white border border-gray-200 px-8 py-4">
        <div class="w-full flex items-center justify-between">

            <h1 class="text-4xl font-bold"><?php echo e($client->name); ?></h1>
            <div class="mt-4 flex flex-col">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->uniqueProducts->count() > 0): ?>
                    <div class="mb-2 font-bold">
                        Productos activos
                    </div>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                <div class="flex flex-wrap items-center">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $this->uniqueProducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <div class="relative group"
                            style="z-index: <?php echo e(count($this->uniqueProducts) - $index); ?>; margin-left: <?php echo e($index > 0 ? '-12px' : '0'); ?>;">
                            <img src="<?php echo e($product->image_url ?? asset('images/placeholder.png')); ?>"
                                alt="<?php echo e($product->name); ?>"
                                class="w-12 h-12 bg-white rounded-full object-contain border-2 border-gray-200 hover:border-3ip transition-all cursor-pointer"
                                title="<?php echo e($product->name); ?>">
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <p class="text-gray-500 text-sm">No hay productos asociados</p>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
            </div>
        </div>
        <div class="w-full flex items-center mt-4">
            <div class="flex">
                <div class="w-12 h-12 border rounded flex items-center justify-center">
                    <img src="<?php echo e(asset('vendor/blade-untitledui-icons/check-done-02.svg')); ?>" alt="Licencias"
                        class="w-8 h-8">
                </div>
                <div class="flex-grow ml-4">
                    <h3 class="text-lg font-bold">Licencias</h3>
                    <p class="text-gray-500 text-sm">
                        <?php echo e($client->tokens->count()); ?>

                    </p>
                </div>
            </div>
            <div class="flex ml-12">
                <div class="w-12 h-12 border rounded flex items-center justify-center">
                    <img src="<?php echo e(asset('vendor/blade-untitledui-icons/server-04.svg')); ?>" alt="Licencias"
                        class="w-8 h-8">
                </div>
                <div class="flex-grow ml-4">
                    <h3 class="text-lg font-bold">Entornos</h3>
                    <p class="text-gray-500 text-sm">
                        <?php echo e($client->environments->count()); ?>

                    </p>
                </div>
            </div>
            <div class="flex ml-12">
                <div class="w-12 h-12 border rounded flex items-center justify-center">
                    <img src="<?php echo e(asset('vendor/blade-untitledui-icons/mail-02.svg')); ?>" alt="Licencias"
                        class="w-8 h-8">
                </div>
                <div class="flex-grow ml-4">
                    <?php
                        $contactsCount = count($client->contacts ?? []);
                    ?>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($contactsCount > 0): ?>
                        <button wire:click="openContactsModal" class="text-lg font-bold hover:text-blue-600 transition-colors cursor-pointer">Contacto</button>
                    <?php else: ?>
                        <button class="text-lg font-bold cursor-not-allowed">Contacto</button>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    <p class="text-gray-500 text-sm">
                        <?php echo e($contactsCount); ?> contacto(s)
                    </p>
                </div>
            </div>
        </div>
    </div>

    
    <div class="w-full flex flex-wrap items-center justify-between mt-8">
        <div class="w-80">
            <input type="text" wire:model.live.debounce.300ms="search" class="w-full rounded-lg border border-gray-200 px-4 py-2"
                placeholder="Buscar entorno por nombre o dominio">
        </div>
        <div>
            <select wire:model.live="typeFilter" name="type" id="type" class="w-full rounded-lg border border-gray-200 px-4 py-2">
                <option value="all">Todos</option>
                <option value="local">Local</option>
                <option value="develop">Desarrollo</option>
                <option value="pre">PreProducción</option>
                <option value="pro">Producción</option>
            </select>
        </div>
    </div>

    
    <div class="environment-card-list">
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $this->filteredEnvironments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $environment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php
$__split = function ($name, $params = []) {
    return [$name, $params];
};
[$__name, $__params] = $__split('environments.components.environment-card', ['environment' => $environment,'client' => $client]);

$key = ''.e($environment->id).'';

$key ??= \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::generateKey('lw-1351623360-0', ''.e($environment->id).'');

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

echo $__html;

unset($__html);
unset($__name);
unset($__params);
unset($__split);
if (isset($__slots)) unset($__slots);
?>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
    </div>
</div>
</div><?php /**PATH /var/www/html/resources/views/livewire/clients/show.blade.php ENDPATH**/ ?>