<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'paymentMethods', // Collection of methods
    'title' => 'Choose a Transfer Method', // Default heading
]));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter(([
    'paymentMethods', // Collection of methods
    'title' => 'Choose a Transfer Method', // Default heading
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>

<div x-data="{ showAll: false }" x-cloak x-show="$wire.selectedMethod === null"
    x-transition:enter="transition ease-out duration-300" x-transition:enter-start="opacity-0 translate-y-3"
    x-transition:enter-end="opacity-100 translate-y-0" x-transition:leave="transition ease-in duration-200"
    x-transition:leave-start="opacity-100 translate-y-0" x-transition:leave-end="opacity-0 translate-y-3"
    class="space-y-4">

    
    <h2 class="text-lg font-bold text-gray-900 dark:text-white mb-3">
        <?php echo e($title); ?>

    </h2>

    
    <ul class="grid grid-cols-1 md:grid-cols-2 w-full gap-2">
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $paymentMethods; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $method): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($index < 6): ?>
                <li class="flex flex-col w-full">
                    <button type="button" wire:click="selectMethod(<?php echo e($method->id); ?>)" wire:loading.attr="disabled"
                        wire:target="selectMethod(<?php echo e($method->id); ?>)" class="relative cursor-pointer w-full">
                        <?php if (isset($component)) { $__componentOriginalaf33386d69c58196eaed7da6d0d92241 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalaf33386d69c58196eaed7da6d0d92241 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.payment-method-card','data' => ['method' => $method,'clickable' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('payment-method-card'); ?>
<?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(['method' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($method),'clickable' => true]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalaf33386d69c58196eaed7da6d0d92241)): ?>
<?php $attributes = $__attributesOriginalaf33386d69c58196eaed7da6d0d92241; ?>
<?php unset($__attributesOriginalaf33386d69c58196eaed7da6d0d92241); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalaf33386d69c58196eaed7da6d0d92241)): ?>
<?php $component = $__componentOriginalaf33386d69c58196eaed7da6d0d92241; ?>
<?php unset($__componentOriginalaf33386d69c58196eaed7da6d0d92241); ?>
<?php endif; ?>

                        
                        <div wire:loading wire:target="selectMethod(<?php echo e($method->id); ?>)"
                            class="absolute inset-0 bg-white/50 dark:bg-gray-800/50 flex items-center justify-center rounded-xl">
                            <svg class="animate-spin h-5 w-5 text-sky-500" xmlns="http://www.w3.org/2000/svg"
                                fill="none" viewBox="0 0 24 24">
                                <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor"
                                    stroke-width="4"></circle>
                                <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v8H4z"></path>
                            </svg>
                        </div>
                    </button>
                </li>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
    </ul>

    
    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($paymentMethods->count() > 6): ?>
        <div x-show="showAll" x-collapse class="grid grid-cols-1 md:grid-cols-2 w-full gap-2 mt-2">
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $paymentMethods; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $method): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($index >= 6): ?>
                    <div class="flex flex-col w-full">
                        <button type="button" wire:click="selectMethod(<?php echo e($method->id); ?>)"
                            class="cursor-pointer w-full">
                            <?php if (isset($component)) { $__componentOriginalaf33386d69c58196eaed7da6d0d92241 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalaf33386d69c58196eaed7da6d0d92241 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.payment-method-card','data' => ['method' => $method,'clickable' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('payment-method-card'); ?>
<?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(['method' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($method),'clickable' => true]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalaf33386d69c58196eaed7da6d0d92241)): ?>
<?php $attributes = $__attributesOriginalaf33386d69c58196eaed7da6d0d92241; ?>
<?php unset($__attributesOriginalaf33386d69c58196eaed7da6d0d92241); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalaf33386d69c58196eaed7da6d0d92241)): ?>
<?php $component = $__componentOriginalaf33386d69c58196eaed7da6d0d92241; ?>
<?php unset($__componentOriginalaf33386d69c58196eaed7da6d0d92241); ?>
<?php endif; ?>
                        </button>
                    </div>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
        </div>

        <?php
            $hiddenMethods = $paymentMethods->slice(6);
            $hiddenCount = $hiddenMethods->count();
            $firstHiddenName = $hiddenMethods->first()?->name ?? '';
        ?>

        
        <div class="mt-2" x-data>
            <button type="button" @click="showAll = !showAll" class="w-full">
                <div :class="showAll ? 'bg-sky-50 dark:bg-sky-950 border-sky-400' :
                    'bg-white dark:bg-gray-900 border-dashed border-gray-300 dark:border-gray-700'"
                    class="group flex items-center gap-4 rounded-2xl border px-6 py-5 transition shadow-sm hover:shadow-md hover:border-sky-400">

                    <div class="flex h-12 w-12 items-center justify-center rounded-xl bg-gray-100 dark:bg-gray-800">
                        <svg x-show="!showAll" class="w-6 h-6 text-sky-500" fill="none" stroke="currentColor"
                            stroke-width="2" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4" />
                        </svg>
                        <svg x-show="showAll" class="w-6 h-6 text-sky-600" fill="none" stroke="currentColor"
                            stroke-width="2" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" d="M20 12H4" />
                        </svg>
                    </div>

                    <div class="flex-1 text-left">
                        <p class="font-medium text-gray-900 dark:text-gray-100"
                            x-text="showAll ? 'Show fewer methods' : 'Show <?php echo e($hiddenCount); ?> more methods'">
                        </p>
                        <p class="text-xs text-gray-500 truncate max-w-[320px]"
                            x-text="showAll ? 'Collapse list' : '<?php echo e($firstHiddenName); ?>'"></p>
                    </div>

                    <span
                        :class="showAll ? 'bg-sky-600 text-white' :
                            'bg-gray-100 dark:bg-gray-800 text-gray-500 group-hover:bg-sky-600 group-hover:text-white'"
                        class="text-xs px-3 py-1 rounded-full transition"
                        x-text="showAll ? 'Less' : '+<?php echo e($hiddenCount); ?>'"></span>
                </div>
            </button>
        </div>
    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<?php /**PATH /Users/macuser/Herd/Novabank/resources/views/partials/transfer-methods.blade.php ENDPATH**/ ?>