require("../../../_virtual/_rolldown/runtime.js");
let react = require("react");
//#region src/pro/Login2.0/hooks/useRegistrationMethods.ts
/**
* 注册方式相关的逻辑hook
*/
function useRegistrationMethods(isRegistrationMethodEnabled) {
	const enabledMethods = (0, react.useMemo)(() => {
		const methods = [];
		if (isRegistrationMethodEnabled("email")) methods.push("email");
		if (isRegistrationMethodEnabled("phone")) methods.push("phone");
		if (isRegistrationMethodEnabled("google")) methods.push("google");
		if (isRegistrationMethodEnabled("facebook")) methods.push("facebook");
		if (isRegistrationMethodEnabled("apple")) methods.push("apple");
		return methods;
	}, [isRegistrationMethodEnabled]);
	return {
		enabledMethods,
		shouldShowDivider: (0, react.useMemo)(() => {
			return enabledMethods.length > 1;
		}, [enabledMethods.length]),
		hasEmailAndPhone: (0, react.useMemo)(() => {
			return isRegistrationMethodEnabled("email") && isRegistrationMethodEnabled("phone");
		}, [isRegistrationMethodEnabled])
	};
}
//#endregion
exports.useRegistrationMethods = useRegistrationMethods;
