import { canonicalWeixinPeerId, normalizeWeixinAccountId } from "../auth/weixin-account-id.js";
//#region extensions/weixin/src/messaging/typing-ticket-store.ts
/** In-memory typing_ticket per (accountId, peer user id) — refreshed from getConfig in monitor. */
const tickets = /* @__PURE__ */ new Map();
function storeKey(accountId, ilinkUserId) {
	return `${normalizeWeixinAccountId(accountId)}:${canonicalWeixinPeerId(ilinkUserId)}`;
}
function setWeixinTypingTicket(accountId, ilinkUserId, typingTicket) {
	const k = storeKey(accountId, ilinkUserId);
	const t = typingTicket.trim();
	if (t) tickets.set(k, t);
	else tickets.delete(k);
}
function getWeixinTypingTicket(accountId, ilinkUserId) {
	return tickets.get(storeKey(accountId, ilinkUserId));
}
//#endregion
export { getWeixinTypingTicket, setWeixinTypingTicket };

//# sourceMappingURL=typing-ticket-store.js.map