// Copyright 2024 The Lynx Authors. All rights reserved.
// Licensed under the Apache License Version 2.0 that can be found in the
// LICENSE file in the root directory of this source tree.
import * as mainThreadHooks from '../../core/hooks/mainThreadImpl.js';
import * as backgroundHooks from '../../core/hooks/react.js';
function currentHooks() {
    return __MAIN_THREAD__
        ? mainThreadHooks
        : backgroundHooks;
}
const useState = ((...args) => currentHooks().useState(...args));
const useReducer = ((...args) => currentHooks().useReducer(...args));
const useRef = ((...args) => currentHooks().useRef(...args));
const useImperativeHandle = ((...args) => currentHooks().useImperativeHandle(...args));
const useLayoutEffect = ((...args) => currentHooks().useLayoutEffect(...args));
const useEffect = ((...args) => currentHooks().useEffect(...args));
const useCallback = ((...args) => currentHooks().useCallback(...args));
const useMemo = ((...args) => currentHooks().useMemo(...args));
const useContext = ((...args) => currentHooks().useContext(...args));
const useDebugValue = ((...args) => currentHooks().useDebugValue(...args));
const useErrorBoundary = ((...args) => currentHooks().useErrorBoundary(...args));
const useId = ((...args) => currentHooks().useId(...args));
export { useCallback, useContext, useDebugValue, useEffect, useErrorBoundary, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, };
//# sourceMappingURL=react.js.map