<!DOCTYPE html>
<html lang="zxx">
    <?php require __DIR__ . '/includes/head.php'; ?>

    <body class="bg-body-bg"><?php require __DIR__ . '/includes/loading.php'; ?><?php require __DIR__ . '/includes/sidebar.php'; ?>


        <!-- Start Main Content Area -->
        <div class="container-fluid">
            <div class="main-content d-flex flex-column">
                <?php require __DIR__ . '/includes/topbar.php'; ?>


                <div class="main-content-container overflow-hidden">
                    <div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-4 mt-1">
                        <h3 class="mb-0">Calendar</h3>

                        <nav aria-label="breadcrumb">
                            <ol class="breadcrumb align-items-center mb-0 lh-1">
                                <li class="breadcrumb-item">
                                    <a href="index.html" class="d-flex align-items-center text-decoration-none">
                                        <i class="ri-home-8-line fs-15 text-primary me-1"></i>
                                        <span class="text-body fs-14 hover">Dashboard</span>
                                    </a>
                                </li>
                                <li class="breadcrumb-item active" aria-current="page">
                                    <span>Apps</span>
                                </li>
                                <li class="breadcrumb-item active" aria-current="page">
                                    <span class="text-secondary">Calendar</span>
                                </li>
                            </ol>
                        </nav>
                    </div>

                    <div class="row">
                        <div class="col-xxl-8 col-xxxl-12">
                            <div class="card bg-white rounded-10 border border-white p-20 mb-4">
                                <div class="calendar-wrap">
                                    <div id="calendar"></div>
                                </div>
                            </div>
                        </div>
                        <div class="col-xxl-4 col-xxxl-12">
                            <div class="card bg-white rounded-10 border border-white p-20 mb-4">
                                <h3 class="mb-20">Working Schedule</h3>

                                <div class="calendar-container style-two mb-20">
                                    <div class="calendar-header mb-3">
                                        <button id="prevMonth" class="change-btn">
                                            <i class="ri-arrow-left-s-line"></i>
                                        </button>
                                        <div class="">
                                            <select id="monthSelect" class="month-year"></select>
                                            <select id="yearSelect" class="month-year"></select>
                                        </div>
                                        <button id="nextMonth" class="change-btn">
                                            <i class="ri-arrow-right-s-line"></i>
                                        </button>
                                    </div>
                                    <table class="calendar-table">
                                        <thead>
                                            <tr>
                                                <th>S</th>
                                                <th>M</th>
                                                <th>T</th>
                                                <th>W</th>
                                                <th>T</th>
                                                <th>F</th>
                                                <th>S</th>
                                            </tr>
                                        </thead>
                                        <tbody id="calendarBody">
                                            <!-- Calendar days will be dynamically generated here -->
                                        </tbody>
                                    </table>
                                </div>

                                <h3 class="mb-20">EVENTS</h3>

                                <ul class="p-0 mb-0 list-unstyled last-child-none working-schedule-list">
                                    <li class="border-border-color" style="border-bottom: 1px dashed; margin-bottom: 20.6px; padding-bottom: 20.6px;">
                                        <div class="d-flex">
                                            <div class="flex-shrink-0">
                                                <span class="d-block bg-primary rounded-circle position-relative top-9" style="width: 10px; height: 10px;"></span>
                                            </div>
                                            <div class="flex-grow-1 ms-10">
                                                <p class="fs-16 mb-1 lh-1-8">Annual Conference</p>
                                                <span class="fs-16"><span class="text-primary">November 21</span> (10:00 - 11:00 AM)</span>
                                            </div>
                                        </div>
                                    </li>
                                    <li class="border-border-color" style="border-bottom: 1px dashed; margin-bottom: 20.6px; padding-bottom: 20.6px;">
                                        <div class="d-flex">
                                            <div class="flex-shrink-0">
                                                <span class="d-block bg-info rounded-circle position-relative top-9" style="width: 10px; height: 10px;"></span>
                                            </div>
                                            <div class="flex-grow-1 ms-10">
                                                <p class="fs-16 mb-1 lh-1-8">Product Lunch Webinar</p>
                                                <span class="fs-16"><span class="text-primary">December 06</span> (02:00 PM)</span>
                                            </div>
                                        </div>
                                    </li>
                                    <li class="border-border-color" style="border-bottom: 1px dashed; margin-bottom: 20.6px; padding-bottom: 20.6px;">
                                        <div class="d-flex">
                                            <div class="flex-shrink-0">
                                                <span class="d-block bg-warning rounded-circle position-relative top-9" style="width: 10px; height: 10px;"></span>
                                            </div>
                                            <div class="flex-grow-1 ms-10">
                                                <p class="fs-16 mb-1 lh-1-8">Tech Summit 2025</p>
                                                <span class="fs-16"><span class="text-primary">December 13</span> (03:00 PM)</span>
                                            </div>
                                        </div>
                                    </li>
                                    <li class="border-border-color" style="border-bottom: 1px dashed; margin-bottom: 20.6px; padding-bottom: 20.6px;">
                                        <div class="text-end">
                                            <button class="bg-transparent text-primary fs-16 border-0 p-0" data-bs-toggle="modal" data-bs-target="#exampleModal2">+ Add New Event</button>
                                        </div>
                                    </li>
                                </ul>

                                <!-- Modal Add New Event -->
                                <div class="modal fade" id="exampleModal2" tabindex="-1" aria-labelledby="exampleModal2Label" aria-hidden="true">
                                    <div class="modal-dialog modal-dialog-centered rounded-10" style="max-width: 550px;">
                                        <form class="modal-content bg-white">
                                            <div class="modal-header border-border-color-40 p-20">
                                                <h1 class="modal-title fs-18 fw-medium mb-0" id="exampleModal2Label">Add New Event</h1>
                                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                                            </div>
                                            <div class="modal-body p-20 pb-0">
                                                <div class="row">
                                                    <div class="col-lg-12">
                                                        <div class="mb-20">
                                                            <label class="label">Event Name</label>
                                                            <div class="form-floating">
                                                                <input type="email" class="form-control" id="floatingInput" placeholder="Event Name">
                                                                <label for="floatingInput">Event Name</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-12">
                                                        <div class="mb-20">
                                                            <label class="label">Event Date</label>
                                                            <input type="date" class="form-control">
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-12">
                                                        <div class="mb-20">
                                                            <label class="label">Event Time</label>
                                                            <input type="time" class="form-control">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="modal-footer border-0 p-20 pt-0">
                                                <button type="button" class="btn btn-danger fw-normal text-white" data-bs-dismiss="modal">Cancel</button>
                                                <button type="button" class="btn btn-primary fw-normal text-white">Create</button>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="flex-grow-1"></div>

                <?php require __DIR__ . '/includes/footer.php'; ?>

            </div>
        </div>
        <!-- Start Main Content Area -->

        <!-- Start Theme Setting Area -->
        <button class="btn btn-primary theme-settings-btn p-0 position-fixed z-2 text-center rounded-circle" style="bottom: 24px; right: 24px; width: 56px; height: 56px; line-height: 54px;" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasScrolling" aria-controls="offcanvasScrolling">
            <i class="text-white ri-settings-3-fill fs-28" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-title="Click On Theme Settings"></i>
        </button>

        <!-- Start Theme Setting Area -->
        <div class="offcanvas offcanvas-end bg-white border-0" data-bs-scroll="true" data-bs-backdrop="true" tabindex="-1" id="offcanvasScrolling" aria-labelledby="offcanvasScrollingLabel" style="box-shadow: 0 4px 20px #2f8fe812 !important; max-width: 300px;">
            <div class="offcanvas-header bg-light p-20">
                <h5 class="offcanvas-title fs-18 fw-medium" id="offcanvasScrollingLabel">Configuration Panel</h5>
                <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
            </div>
            <div class="offcanvas-body p-0 overflow-hidden">
                <div class="last-child-none" style="max-height: 858px;" data-simplebar>
                    <div class="p-20 border-bottom child">
                        <h4 class="fs-15 fw-medium mb-12">RTL Mode</h4>
                        <div class="rtl-btn">
                            <label id="switch">
                                <input type="checkbox" onchange="toggleTheme()" class="toggle-switch rtl-switch" id="slider">
                            </label>
                        </div>
                    </div>
                    <div class="p-20 border-bottom child">
                        <h4 class="fs-15 fw-medium mb-12">Only Sidebar Dark</h4>
                        <div class="sidebar-light-dark" id="sidebar-light-dark">
                            <input type="checkbox" class="toggle-switch sidebar-dark-switch">
                        </div>
                    </div>
                    <div class="p-20 border-bottom child">
                        <h4 class="fs-15 fw-medium mb-12">Only Header Dark</h4>
                        <div class="header-light-dark" id="header-light-dark">
                            <input type="checkbox" class="toggle-switch header-dark-switch">
                        </div>
                    </div>
                    <div class="p-20 border-bottom child">
                        <h4 class="fs-15 fw-medium mb-12">Right Sidebar</h4>
                        <div class="right-sidebar" id="right-sidebar">
                            <input type="checkbox" class="toggle-switch right-sidebar-switch">
                        </div>
                    </div>
                    <div class="p-20 border-bottom child">
                        <h4 class="fs-15 fw-medium mb-12">Hide Sidebar</h4>
                        <div class="icon-sidebar" id="icon-sidebar">
                            <input type="checkbox" class="toggle-switch icon-sidebar-switch">
                        </div>
                    </div>
                    <div class="p-20 border-bottom child">
                        <h4 class="fs-15 fw-medium mb-12">Bordered Card</h4>
                        <div class="card-border" id="card-border">
                            <input type="checkbox" class="toggle-switch border-switch">
                        </div>
                    </div>
                    <div class="p-20 border-bottom child">
                        <h4 class="fs-15 fw-medium mb-12">Card Border Radius</h4>
                        <div class="card-radius-square" id="card-radius-square">
                            <input type="checkbox" class="toggle-switch border-radius-switch">
                        </div>
                    </div>
                    
                    <div class="p-20 border-bottom child">
                        <a href="#" class="btn btn-primary text-white">
                            Buy Fila
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <!-- End Theme Setting Area -->
     
        <!-- Link Of JS File -->
        <script src="assets/js/bootstrap.bundle.min.js"></script>
        <script src="assets/js/sidebar-menu.js"></script>
        <script src="assets/js/quill.min.js"></script>
        <script src="assets/js/data-table.js"></script>
        <script src="assets/js/prism.js"></script>
        <script src="assets/js/clipboard.min.js"></script>
        <script src="assets/js/simplebar.min.js"></script>
        <script src="assets/js/apexcharts.min.js"></script>
        <script src="assets/js/echarts.min.js"></script>
        <script src="assets/js/swiper-bundle.min.js"></script>
        <script src="assets/js/fullcalendar.main.js"></script>
        <script src="assets/js/jsvectormap.min.js"></script>
        <script src="assets/js/world-merc.js"></script>
        <script src="assets/js/custom/apexcharts.js"></script>
        <script src="assets/js/custom/echarts.js"></script>
        <script src="assets/js/custom/maps.js"></script>
        <script src="assets/js/custom/custom.js"></script>
    </body>
</html>