import { buildPlayerUpdateMessage } from "../contracts.js";
export default function playerUpdate() {
    if (window.Eden.socket?.readyState !== WebSocket.OPEN ||
        !window.Eden.clientId) {
        return;
    }
    const pathname = window.location.pathname;
    window.Eden.socket.send(JSON.stringify(buildPlayerUpdateMessage({
        clientId: window.Eden.clientId,
        firstName: window.Eden.user.firstName,
        lastName: window.Eden.user.lastName,
        path: pathname,
    })));
}
