//#region src/testing/index.ts
function createFakeVerifiedPurchasePort(options = {}) {
	const defaultPurchased = options.purchased ?? true;
	return { async hasPurchased(userId, productId, purchaseId) {
		if (options.lookup) return options.lookup(userId, productId, purchaseId);
		return defaultPurchased;
	} };
}
function createFakeModerationAdapter(options = {}) {
	return { async score(text) {
		if (options.scoreFn) return options.scoreFn(text);
		return {
			action: options.action ?? "flag",
			score: options.score ?? .5
		};
	} };
}
/** D3 — trivially-wireable opt-in auto-publish when the host has no moderation infra. */
const noOpAutoApproveModerationAdapter = { async score() {
	return {
		action: "approve",
		score: 1
	};
} };
/** Reference adapter — always flags for manual queue (lands pending). */
const manualQueueModerationAdapter = { async score() {
	return {
		action: "flag",
		score: .5
	};
} };
//#endregion
export { createFakeModerationAdapter, createFakeVerifiedPurchasePort, manualQueueModerationAdapter, noOpAutoApproveModerationAdapter };
