import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "@agentai2027/openclaw-zh/plugin-sdk/account-id";
//#region extensions/matrix/src/matrix/active-client.ts
const activeClients = /* @__PURE__ */ new Map();
function resolveAccountKey(accountId) {
	return normalizeAccountId(accountId) || DEFAULT_ACCOUNT_ID;
}
function setActiveMatrixClient(client, accountId) {
	const key = resolveAccountKey(accountId);
	if (!client) {
		activeClients.delete(key);
		return;
	}
	activeClients.set(key, client);
}
function getActiveMatrixClient(accountId) {
	const key = resolveAccountKey(accountId);
	return activeClients.get(key) ?? null;
}
//#endregion
export { setActiveMatrixClient as n, getActiveMatrixClient as t };
