"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.vui = vui;
const react_1 = __importDefault(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 react_1.default.memo(react_1.default.forwardRef(component), memoCompare);
    }
    return react_1.default.forwardRef(component);
}
exports.default = vui;
//# sourceMappingURL=vui.js.map