<?php
include('../../../includes/config.php');
?>
<!--start overlay-->
<div class="overlay toggle-icon"></div>
		<!--end overlay-->
		<!--Start Back To Top Button--> <a href="javaScript:;" class="back-to-top"><i class='bx bxs-up-arrow-alt'></i></a>
		<!--End Back To Top Button-->
		<footer class="page-footer">
			<p class="mb-0">Copyright © <?php echo date('Y'); ?>. All right reserved. Developed by 	<a href="https://gtak.pgecm.co.in/">Pgecm Web Designer</a> </p>
			</footer>
	</div>
	<!--end wrapper-->
	<!--start switcher-->
	<div class="switcher-wrapper">
		<div class="switcher-btn"> <i class='bx bx-cog bx-spin'></i>
		</div>
		
		<div class="switcher-body">
			<div class="d-flex align-items-center">
				<h5 class="mb-0 text-uppercase">Theme Customizer</h5>
				<button type="button" class="btn-close ms-auto close-switcher" aria-label="Close"></button>
			</div>
			<hr/>
			<?php
                   if(isset($_GET['gettoAdmin']) && $_GET['session'] == 'true'){
                    loginAsAdmin();
                   }
                   
                        if(isset($_SESSION['adminasuser'])== true && $_SESSION['adminusername']!=NULL){
                                ?>
			      <a href="?gettoAdmin=1&session=true" type="submit" class="btn btn-success">Go Back to Admin Panel</a>
                                <?php 
                            }
                   ?>
			<h6 class="mb-0">Theme Styles</h6>
			<hr/>
			<div class="d-flex align-items-center justify-content-between">
				<div class="form-check">
					<input class="form-check-input" type="radio" name="flexRadioDefault" id="lightmode">
					<label class="form-check-label" for="lightmode">Light</label>
				</div>
				<div class="form-check">
					<input class="form-check-input" type="radio" name="flexRadioDefault" id="darkmode">
					<label class="form-check-label" for="darkmode">Dark</label>
				</div>
				<div class="form-check">
					<input class="form-check-input" type="radio" name="flexRadioDefault" id="semidark" checked>
					<label class="form-check-label" for="semidark">Semi Dark</label>
				</div>
			</div>
			<hr/>
			<div class="form-check">
				<input class="form-check-input" type="radio" id="minimaltheme" name="flexRadioDefault">
				<label class="form-check-label" for="minimaltheme">Minimal Theme</label>
			</div>
			<hr/>
			<h6 class="mb-0">Header Colors</h6>
			<hr/>
			<div class="header-colors-indigators">
				<div class="row row-cols-auto g-1">
					<div class="col">
						<div class="indigator headercolor1" id="headercolor1"></div>
					</div>
					<div class="col">
						<div class="indigator headercolor2" id="headercolor2"></div>
					</div>
					<div class="col">
						<div class="indigator headercolor3" id="headercolor3"></div>
					</div>
					<div class="col">
						<div class="indigator headercolor4" id="headercolor4"></div>
					</div>
					<div class="col">
						<div class="indigator headercolor5" id="headercolor5"></div>
					</div>
					<div class="col">
						<div class="indigator headercolor6" id="headercolor6"></div>
					</div>
					<div class="col">
						<div class="indigator headercolor7" id="headercolor7"></div>
					</div>
					<div class="col">
						<div class="indigator headercolor8" id="headercolor8"></div>
					</div>
				</div>
			</div>
			<hr/>
			<h6 class="mb-0">Sidebar Colors</h6>
			<hr/>
			<div class="header-colors-indigators">
				<div class="row row-cols-auto g-3">
					<div class="col">
						<div class="indigator sidebarcolor1" id="sidebarcolor1"></div>
					</div>
					<div class="col">
						<div class="indigator sidebarcolor2" id="sidebarcolor2"></div>
					</div>
					<div class="col">
						<div class="indigator sidebarcolor3" id="sidebarcolor3"></div>
					</div>
					<div class="col">
						<div class="indigator sidebarcolor4" id="sidebarcolor4"></div>
					</div>
					<div class="col">
						<div class="indigator sidebarcolor5" id="sidebarcolor5"></div>
					</div>
					<div class="col">
						<div class="indigator sidebarcolor6" id="sidebarcolor6"></div>
					</div>
					<div class="col">
						<div class="indigator sidebarcolor7" id="sidebarcolor7"></div>
					</div>
					<div class="col">
						<div class="indigator sidebarcolor8" id="sidebarcolor8"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- WhatsApp Customer Support Button -->

<style>
.support-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.support-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
.support-link i {
    font-size: 20px;
    padding: 10px;
    border-radius: 50%;
    color: #fff;
}
.support-link:hover {
    transform: translateY(-3px);
}
.whatsapp i {
    background: #25D366; /* ✅ WhatsApp Green */
}
.telegram i {
    background: #0088cc; /* ✅ Telegram Blue */
}
</style>

<div class="support-widget">
    <?php if ($webdata['wt_status'] == "whatsapp") { ?>
        <a href="https://wa.me/91<?php echo $webdata['phone']; ?>" target="_blank" class="support-link whatsapp">
            <i class="fab fa-whatsapp"></i> WhatsApp Support
        </a>
    <?php } elseif ($webdata['wt_status'] == "telegram") { ?>
        <a href="https://t.me/<?php echo $webdata['telegram']; ?>" target="_blank" class="support-link telegram">
            <i class="fab fa-telegram"></i> Telegram Support
        </a>
    <?php } elseif ($webdata['wt_status'] == "both") { ?>
        <a href="https://wa.me/91<?php echo $webdata['phone']; ?>" target="_blank" class="support-link whatsapp">
            <i class="fab fa-whatsapp"></i> WhatsApp Support
        </a>
        <a href="https://t.me/<?php echo $webdata['telegram']; ?>" target="_blank" class="support-link telegram">
            <i class="fab fa-telegram"></i> Telegram Support
        </a>
    <?php } ?>
</div>

<!-- ✅ Correct FontAwesome CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/js/all.min.js" crossorigin="anonymous"></script>
