import '../../../../../node_modules/preact/compat/dist/compat.module.mjs';
import { isTruthy } from '../../utils/isTruthy.mjs';
import { useAdminPortalOrgUIConfig } from '../StytchClientContext.mjs';
import { useMemo as F } from '../../../../../node_modules/preact/hooks/dist/hooks.module.mjs';

const configMfaMethodMap = {
    smsOtp: 'sms_otp',
    totp: 'totp'
};
const useAllowedMfaMethods = ()=>{
    const orgUIConfig = useAdminPortalOrgUIConfig();
    return F(()=>{
        const mfaMethods = orgUIConfig?.allowedMfaAuthMethods ?? Object.keys(configMfaMethodMap);
        return mfaMethods.map((method)=>configMfaMethodMap[method]).filter(isTruthy);
    }, [
        orgUIConfig?.allowedMfaAuthMethods
    ]);
};

export { useAllowedMfaMethods };
//# sourceMappingURL=useAllowedMfaMethods.mjs.map
