"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.vui = vui;
const react_1 = require("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.
 */
function vui(component, config) {
    const { memoCompare, isMemo = true } = config !== null && config !== void 0 ? config : {};
    if (isMemo) {
        return (0, react_1.memo)((0, react_1.forwardRef)(component), memoCompare);
    }
    return (0, react_1.forwardRef)(component);
}
exports.default = vui;
//# sourceMappingURL=vui.js.map