//#region src/channels/config-helpers.ts
function createTopLevelChannelConfigAdapter(params) {
	return {
		listAccountIds: () => ["default"],
		resolveAccount: (cfg) => params.resolveAccount(cfg),
		defaultAccountId: () => "default",
		isEnabled: (account) => account.enabled !== false,
		resolveAllowFrom: params.resolveAllowFrom ? ({ cfg }) => params.resolveAllowFrom(params.resolveAccount(cfg)) : void 0,
		formatAllowFrom: params.formatAllowFrom ? ({ allowFrom }) => params.formatAllowFrom(allowFrom) : void 0
	};
}
function createScopedChannelConfigAdapter(params) {
	return {
		listAccountIds: params.listAccountIds,
		resolveAccount: params.resolveAccount,
		defaultAccountId: params.defaultAccountId,
		isEnabled: (account) => account.enabled !== false,
		resolveAllowFrom: ({ cfg, accountId }) => params.resolveAllowFrom(params.resolveAccount(cfg, accountId)),
		formatAllowFrom: ({ allowFrom }) => params.formatAllowFrom(allowFrom)
	};
}
function createHybridChannelConfigAdapter(params) {
	return {
		listAccountIds: params.listAccountIds,
		resolveAccount: params.resolveAccount,
		defaultAccountId: () => "default",
		isEnabled: (account) => account.enabled !== false,
		resolveAllowFrom: params.resolveAllowFrom ? ({ cfg, accountId }) => params.resolveAllowFrom(params.resolveAccount(cfg, accountId)) : void 0,
		formatAllowFrom: params.formatAllowFrom ? ({ allowFrom }) => params.formatAllowFrom(allowFrom) : void 0
	};
}
//#endregion
export { createHybridChannelConfigAdapter, createScopedChannelConfigAdapter, createTopLevelChannelConfigAdapter };

//# sourceMappingURL=config-helpers.js.map