import { forwardRef, memo } from 'react';
/**
 * Component creation utility, which combines forwardRef, memo and ensures correct typing with all props included.
 * Config object allows toggling memoization and providing custom 'areEqual' function.
 */
export function vui(component, config) {
    const { memoCompare, isMemo = true } = config ?? {};
    if (isMemo) {
        return memo(forwardRef(component), memoCompare);
    }
    return forwardRef(component);
}
export default vui;
//# sourceMappingURL=vui.js.map