<?php $__env->startSection('title', 'Registration Settings'); ?>
<?php $__env->startSection('kicker', 'Open or close public member registration'); ?>

<?php $__env->startSection('content'); ?>
    <?php echo $__env->make('partials.module-tabs', ['tabs' => [
        ['label' => 'Church Profile', 'route' => 'settings.church-profile', 'icon' => 'landmark'],
        ['label' => 'User Positions', 'route' => 'settings.user-positions', 'icon' => 'briefcase-business'],
        ['label' => 'Member Positions', 'route' => 'settings.member-positions', 'icon' => 'users'],
        ['label' => 'Service Types', 'route' => 'settings.service-types', 'icon' => 'calendar-days'],
        ['label' => 'Sacraments', 'route' => 'settings.sacrament-types', 'icon' => 'cross'],
        ['label' => 'Attendance', 'route' => 'settings.attendance', 'icon' => 'clipboard-check'],
        ['label' => 'Registration', 'route' => 'settings.registration', 'icon' => 'toggle-right'],
        ['label' => 'QR Code', 'route' => 'settings.qr', 'icon' => 'qr-code'],
    ]], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <div class="form-card">
        <form method="POST" action="<?php echo e(route('settings.registration.update')); ?>">
            <?php echo csrf_field(); ?>
            <div class="registration-toggle-card">
                <div>
                    <div class="section-title">Public Registration Window</div>
                    <p>Ukifungua, login page itaonyesha button ya Create Account kwa members kujisajili wenyewe.</p>
                </div>
                <label class="form-switch m-0">
                    <input class="form-check-input" type="checkbox" name="is_open" value="1" <?php if($isOpen): echo 'checked'; endif; ?>>
                </label>
            </div>

            <div class="row g-3 mt-2">
                <div class="col-md-4">
                    <label class="form-label">Default Member Status</label>
                    <select name="default_member_status" class="form-select" required>
                        <option value="inactive" <?php if($defaultStatus === 'inactive'): echo 'selected'; endif; ?>>Inactive until reviewed</option>
                        <option value="active" <?php if($defaultStatus === 'active'): echo 'selected'; endif; ?>>Active immediately</option>
                    </select>
                </div>
                <div class="col-md-8">
                    <label class="form-label">Registration Intro Text</label>
                    <input type="text" name="intro_text" value="<?php echo e(old('intro_text', $introText)); ?>" class="form-control">
                </div>
            </div>

            <button class="btn btn-primary mt-4"><i data-lucide="save"></i><span>Save Registration Settings</span></button>
        </form>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/anglican/resources/views/settings/registration.blade.php ENDPATH**/ ?>