import { isValidElement } from 'react';
import { isPlainObject } from './isPlainObject.js';
export function isReactServerComponent(component) {
    return typeof component === 'function' && isValidElement(component);
}
export function isReactClientComponent(component) {
    // Do this to test for client components (`use client` directive) bc they import as empty objects
    return typeof component === 'object' && !isPlainObject(component);
}
export function isReactComponent(component) {
    return isReactServerComponent(component) || isReactClientComponent(component);
}
export function isPlainFunction(fn) {
    return typeof fn === 'function' && !isReactComponent(fn);
}

//# sourceMappingURL=isReactComponent.js.map