<?php
// Current file ka naam get karein
$current_page = basename($_SERVER['PHP_SELF']);
?>
<header>
    <div class="container">
        <div class="header-inner-wrapper">
            <div class="header-desktop">
                <div class="left-side-logo">
                    <a href="./index.php"><img src="./assets/images/home/header-logo.png" alt=""></a>
                </div>
                <div class="right-side-menu">
                    <div class="pre-header">
                        <ul>
                            <li><a href="javascript:void(0);"><span class="material-symbols-outlined">
                                        location_on
                                    </span>P.O.
                                    Box 2636 - 01000,
                                    Thika, Kenya</a></li>
                            <li><a href="mailto:rs@greenavainternational.com"><span class="material-symbols-outlined">
                                        mail
                                    </span>rs@greenavainternational.com</a></li>
                        </ul>
                    </div>
                    <div class="main-link">
                        <ul>
                            <li><a href="./index.php" <?php echo ($current_page == 'index.php') ? 'class="active"' : ''; ?>>Home</a></li>
                            <li><a href="./about-us.php" <?php echo ($current_page == 'about-us.php') ? 'class="active"' : ''; ?>>About Us</a></li>
                            <li class="dropdown"><a class="dropdown-link" href="./our-products.php">Our Products
                                    <span class="material-symbols-outlined">
                                        keyboard_arrow_down
                                    </span></a>
                                <ul class="dropdown_menu submenu">
                                    <li class="subOption"><a href="./avocado-oil.php">Avocado Oil</a></li>
                                    <li class="subOption"><a href="./dried-fruits-and-vegetables.php">Dried Fruits &
                                            Vegetables</a></li>
                                </ul>
                            </li>
                            <li><a href="./our-process.php" <?php echo ($current_page == 'our-process.php') ? 'class="active"' : ''; ?>>Our Process</a></li>
                            <li><a href="./faqs.php" <?php echo ($current_page == 'faqs.php') ? 'class="active"' : ''; ?>>FAQ's</a></li>
                            <li><a href="./contact-us.php" <?php echo ($current_page == 'contact-us.php') ? 'class="active"' : ''; ?>>Contact Us</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="header-mobile-section">
            <div class="mobile-header-inner-wrapper top-section">
                <div class="mobile-section-left home-mobile-section-left">
                    <a class="desktop-header-logo" href="./index.php"><img src="./assets/images/home/header-logo.png"
                            alt=""></a>
                </div>
                <div class="mobile-section-right">
                    <button class="btn btn-primary mobile-menu-btn" type="button" data-bs-toggle="offcanvas"
                        data-bs-target="#offcanvasExample" aria-controls="offcanvasExample">
                        <i class="fa fa-bars" aria-hidden="true"></i>
                    </button>
                    <div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample"
                        aria-labelledby="offcanvasExampleLabel">
                        <div class="offcanvas-header">
                            <h5 class="offcanvas-title" id="offcanvasExampleLabel"><a class="desktop-header-logo"
                                    href="./index.php"><img src="./assets/images/home/header-logo.png" alt=""></a>
                            </h5>
                            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"><span
                                    class="material-icons">
                                    close
                                </span></button>
                        </div>
                        <div class="offcanvas-body">
                            <ul>
                               <li><a href="./index.php" <?php echo (empty($current_page) || $current_page == 'index.php') ? 'class="active"' : ''; ?>>Home</a></li>
                                <li><a href="./about-us.php" <?php echo ($current_page == 'about-us.php') ? 'class="active"' : ''; ?>>About Us</a></li>
                                <li>
                                    <div class="accordion" id="accordionExample2">
                                        <div class="accordion-item">
                                            <h2 class="accordion-header">
                                                <button class="accordion-button collapsed" type="button"
                                                    data-bs-toggle="collapse" data-bs-target="#range"
                                                    aria-expanded="true" aria-controls="range">
                                                    Our Products
                                                </button>
                                            </h2>
                                            <div id="range" class="accordion-collapse collapse"
                                                data-bs-parent="#accordionExample2">
                                                <div class="accordion-body">
                                                    <ul>
                                                        <li class="subOption"><a href="./avocado-oil.php">Avocado
                                                                Oil</a></li>
                                                        <li class="subOption"><a
                                                                href="./dried-fruits-and-vegetables.php">Dried Fruits &
                                                                Vegetables</a></li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <li><a href="./our-process.php" <?php echo ($current_page == 'our-process.php') ? 'class="active"' : ''; ?>>Our Process</a></li>
                                <li><a href="./faqs.php" <?php echo ($current_page == 'faqs.php') ? 'class="active"' : ''; ?>>FAQ's</a></li>
                                <li><a href="./contact-us.php" <?php echo ($current_page == 'contact-us.php') ? 'class="active"' : ''; ?>>Contact Us</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>