/**
 * mobx-react-lite shim — replaces MobX observer with an identity HOC.
 * Our stores are plain objects (not reactive), so observer() becomes a no-op.
 * Components still re-render on React state changes from Convex hooks.
 */

import type { ComponentType, FC } from 'react';

export function observer<T extends ComponentType<any>>(component: T): T {
	return component;
}

export function useLocalObservable<T>(factory: () => T): T {
	return factory();
}

export const Observer: FC<{ children: () => JSX.Element | null }> = ({ children }) => children() as any;

export default { observer, useLocalObservable, Observer };
