import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { NavLink } from 'react-router-dom';
const isActiveLink = (path) => location.pathname.startsWith(path);
const Navigation = ({ hidePopup }) => {
    // Function to hide popup when a NavLink is clicked
    const handleNavLinkClick = () => {
        hidePopup();
    };
    return (_jsxs("ul", { id: "menu-mobile-menu", className: "menu", children: [_jsx("li", { children: _jsx(NavLink, { to: "/", className: ({ isActive }) => (isActive ? 'active' : ''), onClick: handleNavLinkClick, children: "Home" }) }), _jsx("li", { id: "menu-item-5981", className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5981", children: _jsx(NavLink, { to: "/for-sale", className: ({ isActive }) => isActive || isActiveLink('/sale/') ? 'active' : '', onClick: handleNavLinkClick, children: "Buy" }) }), _jsx("li", { id: "menu-item-5980", className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5980", children: _jsx(NavLink, { to: "/for-rent", className: ({ isActive }) => isActive || isActiveLink('/rent/') ? 'active' : '', onClick: handleNavLinkClick, children: "Rent" }) }), _jsx("li", { id: "menu-item-5980", className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5980", children: _jsx(NavLink, { to: "/list-your-property", className: ({ isActive }) => isActive || isActiveLink('/rent/') ? 'active' : '', onClick: handleNavLinkClick, children: "Sell/Rent your Property" }) }), _jsx("li", { className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5981", children: _jsx(NavLink, { to: "/offplan-properties-for-sale", className: ({ isActive }) => isActive || isActiveLink('/offplan-project/') ? 'active' : '', onClick: handleNavLinkClick, children: "Off-Plan" }) }), _jsx("li", { id: "menu-item-5983", className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5983", children: _jsx(NavLink, { to: "/area-guides", className: ({ isActive }) => isActive || isActiveLink('/area-guides-detail/') ? 'active' : '', onClick: handleNavLinkClick, children: "Communities" }) }), _jsx("li", { className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5981", children: _jsx(NavLink, { to: "article/about-us", className: ({ isActive }) => (isActive ? 'active' : ''), onClick: handleNavLinkClick, children: "About" }) }), _jsx("li", { id: "menu-item-5982", className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5982", children: _jsx(NavLink, { to: "/testimonials", className: ({ isActive }) => (isActive ? 'active' : ''), onClick: handleNavLinkClick, children: "Testimonials" }) }), _jsx("li", { className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5981", children: _jsx(NavLink, { to: "/contact-us", className: ({ isActive }) => (isActive ? 'active' : ''), onClick: handleNavLinkClick, children: "Contact Us" }) }), _jsx("li", { id: "menu-item-5982", className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5982", children: _jsx("a", { href: "/our-teams.html", onClick: handleNavLinkClick, children: "Our Team" }) }), _jsx("li", { id: "menu-item-5982", className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5982", children: _jsx(NavLink, { to: "/career", className: ({ isActive }) => (isActive ? 'active' : ''), onClick: handleNavLinkClick, children: "Careers" }) }), _jsx("li", { className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5981", children: _jsx(NavLink, { to: "/articles/news-media", className: ({ isActive }) => (isActive ? 'active' : ''), onClick: handleNavLinkClick, children: "Our Blog" }) }), _jsx("li", { id: "menu-item-5982", className: "menu-item menu-item-type-post_type menu-item-object-page menu-item-5982", children: _jsx(NavLink, { to: "/developers", className: ({ isActive }) => isActive || isActiveLink('/developers/') ? 'active' : '', onClick: handleNavLinkClick, children: "Developers" }) })] }));
};
export default Navigation;
