import { Heart, LogIn, MessageSquare } from "lucide-react"; import { useTranslation } from "react-i18next"; import { SUPPORT_PAGE } from "~/utils/urls"; import { LinkButton, SendouButton } from "../elements/Button"; import { AnythingAdder } from "./AnythingAdder"; import { GlobalSearch } from "./GlobalSearch"; import { LogInButtonContainer } from "./LogInButtonContainer"; import styles from "./TopRightButtons.module.css"; export function TopRightButtons({ showSupport, showSearch, isLoggedIn, onChatToggle, onChatModalToggle, chatUnreadCount, }: { showSupport: boolean; showSearch: boolean; isLoggedIn: boolean; onChatToggle?: () => void; onChatModalToggle?: () => void; chatUnreadCount?: number; }) { const { t } = useTranslation(["common", "front"]); return (
{showSupport ? ( <>
} variant="outlined" > {t("common:pages.support")}
} variant="outlined" shape="square" />
) : null} {isLoggedIn ? ( <>
{showSearch ? (
) : null}
{onChatToggle ? (
) : null} {onChatModalToggle ? (
) : null} ) : ( }> {t("front:mobileNav.login")} )}
); } function ChatButton({ variant, onPress, unreadCount, }: { variant: "outlined" | "primary"; onPress: () => void; unreadCount?: number; }) { return ( <> } variant={variant} onPress={onPress} /> {unreadCount ? ( {unreadCount} ) : null} ); }