import { approveChannelPairing, approveChannelPairingBySender, listChannelPairingState, revokeChannelPairingPaired } from "./pairing-service.js";
//#region src/channels/pairing/pairing-store-adapter.ts
/** File-based pairing store adapter shared by telegram / feishu / weixin plugins. */
function createStandardPairingAdapter(pairingChannel) {
	return {
		pairingChannel,
		listPending({ cfg, accountId }) {
			return listChannelPairingState({
				channel: pairingChannel,
				accountId,
				config: cfg
			}).pending;
		},
		approveByCode({ cfg: _cfg, accountId, code }) {
			return approveChannelPairing({
				channel: pairingChannel,
				accountId,
				code
			});
		},
		approveBySenderId({ cfg: _cfg, accountId, senderId }) {
			return approveChannelPairingBySender({
				channel: pairingChannel,
				accountId,
				senderId
			});
		},
		revokePaired({ cfg: _cfg, accountId, senderId }) {
			return revokeChannelPairingPaired({
				channel: pairingChannel,
				accountId,
				senderId
			});
		}
	};
}
//#endregion
export { createStandardPairingAdapter };

//# sourceMappingURL=pairing-store-adapter.js.map