import { jsx as _jsx } from "react/jsx-runtime";
import { useEditContext } from "../client/editContext";
import { Avatar } from "../../components/ui/avatar";
export function User({ session }) {
    const editContext = useEditContext();
    if (!editContext)
        return;
    const userName = session.user.fullName || session.user.name;
    const userEmail = session.user.email?.trim();
    const userTitle = userEmail ? `${userName} (${userEmail})` : userName;
    return (_jsx(Avatar, { src: session.user.avatarUrl, name: userName, fallbackColor: session.color, title: userTitle, size: "sm" }));
}
//# sourceMappingURL=User.js.map