/**
 * mobx shim — makeAutoObservable etc. become no-ops.
 */

export function makeAutoObservable<T>(obj: T): T {
	return obj;
}

export function makeObservable<T>(obj: T): T {
	return obj;
}

export function observable<T>(v: T): T {
	return v;
}

export function action<T extends (...args: any[]) => any>(fn: T): T {
	return fn;
}

export function computed<T>(fn: () => T): { get(): T } {
	return { get: fn };
}

export function runInAction<T>(fn: () => T): T {
	return fn();
}

export function reaction<T>(_expression: () => T, _effect: (v: T) => void): () => void {
	return () => {};
}

export function autorun(_fn: () => void): () => void {
	return () => {};
}

export default {
	makeAutoObservable,
	makeObservable,
	observable,
	action,
	computed,
	runInAction,
	reaction,
	autorun,
};
