"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { Home, Building, Calendar, CreditCard, Briefcase, BookOpen } from "lucide-react"; import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; export default function BottomNav({ isOwner, isOwnerOrAgent }) { const { t } = useTranslation(); const pathname = usePathname(); const [isMounted, setIsMounted] = useState(false); const bookingsHref = isOwner ? "/owner/reservations" : "/reservations"; useEffect(() => { setIsMounted(true); }, []); const items = [ { href: "/", label: t("home"), icon: Home }, { href: "/properties", label: t("ourProperties"), icon: Building }, ...(isOwnerOrAgent ? [{ href: "/owner/properties", label: t("myProperties"), icon: Briefcase }] : []), { href: bookingsHref, label: t("reservations"), icon: Calendar }, { href: "/payments", label: t("payments"), icon: CreditCard }, ...(isOwnerOrAgent ? [{ href: "/owner/account-book", label: t("accountBook"), icon: BookOpen }] : []), ]; const isActive = (href) => { if (href === "/") return pathname === "/"; return pathname.startsWith(href); }; return (