<?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([]); ?>
    <div class="portal-container">
        <?php if(session('status')): ?>
            <div class="alert alert-success"><?php echo e(session('status')); ?></div>
        <?php endif; ?>

        <?php
            $displayMoney = function ($service) {
                $amount = number_format((float) $service->amount, 2);
                return strtoupper((string) $service->currency) === 'USD'
                    ? '$'.$amount.' USD'
                    : strtoupper((string) $service->currency).' '.$amount;
            };
        ?>

        <div class="page-head compact-page-head">
            <div>
                <span class="eyebrow">Services</span>
                <h1 class="page-title">My Services</h1>
                <p class="page-subtitle">View your active services, billing periods, due dates, and account options.</p>
            </div>
            <form method="POST" action="<?php echo e(route('client.services.refresh')); ?>">
                <?php echo csrf_field(); ?>
                <button class="secondary-btn" type="submit">Refresh</button>
            </form>
        </div>

        <div class="service-card-list">
            <?php $__empty_1 = true; $__currentLoopData = $services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <?php
                    $status = strtolower(str_replace(' ', '_', (string) $service->status));
                    $statusLabel = ucwords(str_replace('_', ' ', $status ?: 'pending'));
                ?>

                <a class="service-card service-card-link" href="<?php echo e(route('client.services.show', $service)); ?>">
                    <div class="service-card-title">
                        <strong><?php echo e($service->name); ?></strong>
                        <small><?php echo e($service->domain_name ?: 'No domain assigned yet'); ?></small>
                    </div>

                    <div class="service-price">
                        <strong><?php echo e($displayMoney($service)); ?></strong><br>
                        <span class="service-muted"><?php echo e($service->billing_cycle ?: 'Billing cycle unavailable'); ?></span>
                    </div>

                    <div>
                        <strong><?php echo e(optional($service->next_due_date)->format('l, F jS, Y') ?: '-'); ?></strong><br>
                        <span class="service-muted">Next due date</span>
                    </div>

                    <div><span class="status-pill <?php echo e($status); ?>"><?php echo e($statusLabel); ?></span></div>

                    <div>
                        <?php if($status === 'active'): ?>
                            <span class="primary-btn">Manage</span>
                        <?php else: ?>
                            <span class="service-muted">Available after activation</span>
                        <?php endif; ?>
                    </div>
                </a>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <div class="card">
                    <p>No services yet.</p>
                </div>
            <?php endif; ?>
        </div>

        <div style="margin-top:18px;"><?php echo e($services->links()); ?></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 /home/ovbopdha/public_html/ztcart.eagale.xyz/resources/views/client/services.blade.php ENDPATH**/ ?>