import { observer } from "mobx-react-lite";
import { Presence } from "revolt-api/types/Users";
import { User } from "revolt.js/dist/maps/Users";
import { Text } from "preact-i18n";
import Tooltip from "../Tooltip";
interface Props {
user?: User;
tooltip?: boolean;
}
export default observer(({ user, tooltip }: Props) => {
if (user?.online) {
if (user.status?.text) {
if (tooltip) {
return (
{user.status.text}
);
}
return <>{user.status.text}>;
}
if (user.status?.presence === Presence.Busy) {
return ;
}
if (user.status?.presence === Presence.Idle) {
return ;
}
if (user.status?.presence === Presence.Invisible) {
return ;
}
return ;
}
return ;
});