"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var igd_core_1 = require("@intelligentgraphics/igd.core");
var Context_1 = require("./Context");
exports.usePropertyGroups = function (properties) {
    var context = Context_1.usePropertyEditorContext();
    return React.useMemo(function () {
        return igd_core_1.IGXE.createPropertyGroups(properties.map(function (property) { return context.properties[property]; }));
    }, [properties]);
};
var PropertyGroups = function (props) {
    var groups = exports.usePropertyGroups(props.properties);
    return props.children({
        groups: groups,
    });
};
PropertyGroups.displayName = "PropertyGroups";
exports.default = PropertyGroups;
