// Registry React shim — re-exports the host's bundled React via a window
// global so producer bundles share a single React instance with the host.
// Two Reacts would crash at first hook call (invalid hook call / null
// dispatcher). The host populates __HOST_REACT__ in main.tsx before render.
const R = window.__HOST_REACT__
if (!R) {
  throw new Error('Registry React shim: window.__HOST_REACT__ not installed before bundle import')
}

export default R
export const Children = R.Children
export const Component = R.Component
export const Fragment = R.Fragment
export const Profiler = R.Profiler
export const PureComponent = R.PureComponent
export const StrictMode = R.StrictMode
export const Suspense = R.Suspense
export const cloneElement = R.cloneElement
export const createContext = R.createContext
export const createElement = R.createElement
export const createRef = R.createRef
export const forwardRef = R.forwardRef
export const isValidElement = R.isValidElement
export const lazy = R.lazy
export const memo = R.memo
export const startTransition = R.startTransition
export const use = R.use
export const useActionState = R.useActionState
export const useCallback = R.useCallback
export const useContext = R.useContext
export const useDebugValue = R.useDebugValue
export const useDeferredValue = R.useDeferredValue
export const useEffect = R.useEffect
export const useId = R.useId
export const useImperativeHandle = R.useImperativeHandle
export const useInsertionEffect = R.useInsertionEffect
export const useLayoutEffect = R.useLayoutEffect
export const useMemo = R.useMemo
export const useOptimistic = R.useOptimistic
export const useReducer = R.useReducer
export const useRef = R.useRef
export const useState = R.useState
export const useSyncExternalStore = R.useSyncExternalStore
export const useTransition = R.useTransition
export const version = R.version
