<?php $__env->startSection('content'); ?>
    <div class="row g-4">
        <div class="col-lg-4">
            <div class="card shadow-sm">
                <div class="card-header fw-bold">Add Continent</div>
                <div class="card-body">
                    <form method="POST" action="<?php echo e(route('continents.store')); ?>" class="row g-2">
                        <?php echo csrf_field(); ?>
                        <div class="col-12">
                            <label class="form-label">Name <span class="text-danger">*</span></label>
                            <input name="name" class="form-control" required maxlength="100" value="<?php echo e(old('name')); ?>">
                        </div>
                        <div class="col-12">
                            <label class="form-label">Code <span class="text-danger">*</span></label>
                            <input name="code" class="form-control" required maxlength="10" placeholder="e.g. AS, EU" value="<?php echo e(old('code')); ?>">
                        </div>
                        <div class="col-12">
                            <label class="form-label">Status</label>
                            <select name="status" class="form-select">
                                <option value="1" <?php echo e(old('status', '1') == '1' ? 'selected' : ''); ?>>Active</option>
                                <option value="0" <?php echo e(old('status') === '0' ? 'selected' : ''); ?>>Inactive</option>
                            </select>
                        </div>
                        <div class="col-12 d-grid">
                            <button class="btn btn-success">Save</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="col-lg-8">
            <div class="card shadow-sm">
                <div class="card-header fw-bold">Continents</div>
                <div class="card-body p-0">
                    <table class="table table-sm mb-0">
                        <thead>
                        <tr>
                            <th>Name</th>
                            <th>Code</th>
                            <th>Status</th>
                            <th></th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $continents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr>
                                <td><?php echo e($row->name); ?></td>
                                <td><?php echo e($row->code); ?></td>
                                <td><?php echo e($row->status ? 'Active' : 'Inactive'); ?></td>
                                <td class="text-end">
                                    <a href="<?php echo e(route('continents.edit', $row)); ?>" class="btn btn-sm btn-outline-secondary">Edit</a>
                                    <form method="POST" action="<?php echo e(route('continents.destroy', $row)); ?>" class="d-inline" onsubmit="return confirm('Delete? Countries in this continent will be removed.');">
                                        <?php echo csrf_field(); ?>
                                        <?php echo method_field('DELETE'); ?>
                                        <button type="submit" class="btn btn-sm btn-outline-danger">Delete</button>
                                    </form>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr><td colspan="4" class="text-center text-muted py-3">No continents yet.</td></tr>
                        <?php endif; ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\laragon\www\lt\resources\views/geography/continents/index.blade.php ENDPATH**/ ?>