require("../../../../../_virtual/_rolldown/runtime.js");
let react = require("react");
let ahooks = require("ahooks");
//#region src/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.ts
const useIsLowSpeedNetwork = () => {
	const networkState = (0, ahooks.useNetwork)();
	const isLowSpeedNetwork = (0, react.useRef)(false);
	isLowSpeedNetwork.current = (0, react.useMemo)(() => {
		return [
			"slow-2g",
			"2g",
			"3g"
		].includes((networkState === null || networkState === void 0 ? void 0 : networkState.effectiveType) || "") || ((networkState === null || networkState === void 0 ? void 0 : networkState.downlink) || 20) <= 1 || ((networkState === null || networkState === void 0 ? void 0 : networkState.rtt) || 0) > 500;
	}, [networkState]);
	return isLowSpeedNetwork;
};
//#endregion
exports.default = useIsLowSpeedNetwork;
