import { resolveWeixinAllowFromPath } from "../../../../src/channels/pairing/paths.js";
import { appendAllowFromIdSync, readAllowFromIdsSync } from "../../../../src/channels/pairing/allow-from-file.js";
import { resolveFrameworkAllowFromPath } from "./accounts.js";
//#region extensions/weixin/src/auth/pairing.ts
function readFrameworkAllowFromList(accountId) {
	return readAllowFromIdsSync(resolveWeixinAllowFromPath(accountId));
}
async function registerUserInFrameworkStore(params) {
	const trimmedUserId = String(typeof params.userId === "number" ? params.userId : params.userId.trim()).trim();
	if (!trimmedUserId) return { changed: false };
	return { changed: appendAllowFromIdSync(resolveWeixinAllowFromPath(params.accountId), trimmedUserId).changed };
}
//#endregion
export { readFrameworkAllowFromList, registerUserInFrameworkStore, resolveFrameworkAllowFromPath };

//# sourceMappingURL=pairing.js.map