//#region src/browser/browser-command-timeout.ts
const DEFAULT_MS = 3e4;
const MIN_SEC = 5;
const MAX_SEC = 900;
/** Playwright action timeout from `agents.defaults.browser.commandTimeout` (seconds). */
function resolveBrowserCommandTimeoutMs(cfg) {
	const sec = cfg?.agents?.defaults?.browser?.commandTimeout;
	if (typeof sec === "number" && Number.isFinite(sec)) {
		const n = Math.floor(sec);
		if (n >= MIN_SEC && n <= MAX_SEC) return n * 1e3;
	}
	return DEFAULT_MS;
}
//#endregion
export { resolveBrowserCommandTimeoutMs };

//# sourceMappingURL=browser-command-timeout.js.map