<?php $__env->startSection('title', 'Domains — TechCorp Manager'); ?>

<?php $__env->startSection('content'); ?>
<div data-tc-api-page="domains">
    <div class="tc-page-head-row">
        <div class="tc-page-head">
            <h2>Domains</h2>
            <p>Domain names and renewals. CRUD uses the API.</p>
        </div>
        <button type="button" class="tc-btn-primary" id="tc-add-domain">+ Add domain</button>
    </div>

    <div class="tc-card">
        <div class="tc-table-wrap">
            <table class="tc-table">
                <thead>
                    <tr>
                        <th>Domain</th>
                        <th>Registrar</th>
                        <th>Expires</th>
                        <th>Auto-renew</th>
                        <th>Server</th>
                        <th>Status</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $domains; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $domain): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <?php
                            $rowStyle = '';
                            if ($domain->expiration_date) {
                                if ($domain->expiration_date->isPast()) {
                                    $rowStyle = 'background:#fee2e2;';
                                } elseif ($domain->expiration_date->diffInDays(now()) <= 30) {
                                    $rowStyle = 'background:#fef3c7;';
                                }
                            }
                        ?>
                        <tr style="<?php echo e($rowStyle); ?>">
                            <td><strong><?php echo e($domain->name); ?></strong></td>
                            <td><?php echo e($domain->registrar ?? '—'); ?></td>
                            <td><?php echo e($domain->expiration_date?->format('M j, Y') ?? '—'); ?></td>
                            <td><?php echo e($domain->auto_renew ? 'Yes' : 'No'); ?></td>
                            <td><?php echo e($domain->server?->name ?? '—'); ?></td>
                            <td><span class="tc-badge <?php echo e($domain->status); ?>"><?php echo e($domain->status); ?></span></td>
                            <td class="tc-table-actions">
                                <button type="button" class="tc-btn-sm tc-edit-domain" data-id="<?php echo e($domain->id); ?>">Edit</button>
                                <button type="button" class="tc-btn-sm danger tc-del-domain" data-id="<?php echo e($domain->id); ?>">Delete</button>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr><td colspan="7" class="tc-empty">No domains yet.</td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\pc\Desktop\compnany\laravel-api\resources\views\domains\index.blade.php ENDPATH**/ ?>