  <!--start main wrapper-->

      <main class="main-wrapper">
        <div class="main-content">
            <h3 class="fmon fw-bold">Authorizations</h3>


            <div class="row">
<?php 
// echo "<pre>";
// print_r($authorization);
// echo "</pre>";
?>


                <div class="row">
                    <div class="col-md-12 my-2">
                        <div class="custom-toolbar px-3 py-2">
                            <p class="mb-0 ft8">Authorizations</p>
                        </div>
                        <div class="card p-4 my-2 border-15">
                            <h2 class="text-center mb-3">Authorization Types</h2>
                            <form id="authorizationForm" method="post" action="<?php echo base_url(); ?>site/updateAuthorizations">
                                <div id="auth-options" class="mb-3 d-flex justify-content-between">
                                    <div class="form-check form-switch">
                                        <input class="form-check-input auth-checkbox" type="checkbox" 
                                        name="auth_types[Employees]"
                                        id="oauth"
                                        value="1"
                                        <?php if($authorization['tabFields']['Employees'] == 1){ ?>
                                        checked
                                        <?php } ?>
                                        onchange="toggleAuth('Employees')">
                                        <label class="form-check-label" for="oauth">Employees</label>
                                    </div>
                                    <div class="form-check form-switch">
                                        <input class="form-check-input auth-checkbox" type="checkbox" 
                                        name="auth_types[School_Bus]"
                                        value="1"
                                        <?php if($authorization['tabFields']['School Bus'] == 1){ ?>
                                        checked
                                        <?php } ?>
                                        id="jwt"
                                        onchange="toggleAuth('SchoolBus')">
                                        <label class="form-check-label" for="jwt">School Bus</label>
                                    </div>
                                    <div class="form-check form-switch">
                                        <input class="form-check-input auth-checkbox" type="checkbox"
                                        name="auth_types[Single_Entry]"
                                        value="1"
                                        id="basicAuth"
                                        <?php if($authorization['tabFields']['Single Entry'] == 1){ ?>
                                        checked
                                        <?php } ?>
                                        onchange="toggleAuth('Single Entry')">
                                        <label class="form-check-label" for="basicAuth">Single Entry</label>
                                    </div>
                                    <div class="form-check form-switch">
                                        <input class="form-check-input auth-checkbox" type="checkbox"
                                        name="auth_types[Express]"
                                        value="1"
                                        id="apiKey"
                                        <?php if($authorization['tabFields']['Express'] == 1){ ?>
                                        checked
                                        <?php } ?>
                                        onchange="toggleAuth('Express')">
                                        <label class="form-check-label" for="apiKey">Express</label>
                                    </div>
                                    <div class="form-check form-switch">
                                        <input class="form-check-input auth-checkbox" type="checkbox"
                                        name="auth_types[Guests]"
                                        value="1"
                                        id="guests"
                                        <?php if($authorization['tabFields']['Guests'] == 1){ ?>
                                        checked
                                        <?php } ?>
                                        onchange="toggleAuth('Guests')">
                                        <label class="form-check-label" for="guests">Guests</label>
                                    </div>
                                    <div class="form-check form-switch">
                                        <input class="form-check-input auth-checkbox" type="checkbox" 
                                        name="auth_types[Visit_Log]"
                                        value="1"
                                        id="visitLog"
                                        <?php if($authorization['tabFields']['Visit Log'] == 1){ ?>
                                        checked
                                        <?php } ?>
                                        onchange="toggleAuth('visit log')">
                                        <label class="form-check-label" for="visitLog">Visit Log</label>
                                    </div>
                                    <div class="form-check form-switch">
                                        <input class="form-check-input auth-checkbox" type="checkbox"
                                        name="auth_types[Permanent]"
                                        value="1"
                                        id="permanent"
                                        <?php if($authorization['tabFields']['Permanent'] == 1){ ?>
                                        checked
                                        <?php } ?>
                                        onchange="toggleAuth('Permanent')">
                                        <label class="form-check-label" for="permanent">Permanent</label>
                                    </div>
                                </div>
                                <div class="p-3 bg-light rounded">
                                    <h4>Enabled Options:</h4>
                                    <ul id="enabled-options" class="list-unstyled mb-0">
                                        <li class="text-muted">No options enabled</li>
                                    </ul>
                                </div>
                                <div class="text-center mt-3">
                                    <button type="submit" class="btn btn-primary">Save Authorization Settings</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        </div>

    </main>
    <!--end main wrapper-->

