import { buildDefaultCorsOrigins, isAllInterfacesHost, isLoopbackHost } from "./host.js";
import { resolveGatewayBindHostSync, resolveGatewayBindMode, resolveGatewayCustomBindHost } from "../config/gateway-bind.js";
//#region src/gateway/listen.ts
/** Resolve the effective HTTP listen host (CLI bind override > config bind). */
function resolveGatewayListenHost(params) {
	return resolveGatewayBindHostSync({
		bindMode: resolveGatewayBindMode(params.cfg, params.bindOverride),
		customBindHost: resolveGatewayCustomBindHost(params.cfg)
	});
}
function resolveGatewayListenPlan(params) {
	const bindMode = resolveGatewayBindMode(params.cfg, params.bindOverride);
	const customBindHost = resolveGatewayCustomBindHost(params.cfg);
	return {
		bindMode,
		bindHost: resolveGatewayBindHostSync({
			bindMode,
			customBindHost
		}),
		customBindHost
	};
}
//#endregion
export { buildDefaultCorsOrigins, isAllInterfacesHost, isLoopbackHost, resolveGatewayListenHost, resolveGatewayListenPlan };

//# sourceMappingURL=listen.js.map