import * as React from "react";
import { IGXE } from "@intelligentgraphics/igd.core";
import { usePropertyEditorContext } from "./Context";
export var usePropertyGroups = function (properties) {
    var context = usePropertyEditorContext();
    return React.useMemo(function () {
        return IGXE.createPropertyGroups(properties.map(function (property) { return context.properties[property]; }));
    }, [properties]);
};
var PropertyGroups = function (props) {
    var groups = usePropertyGroups(props.properties);
    return props.children({
        groups: groups,
    });
};
PropertyGroups.displayName = "PropertyGroups";
export default PropertyGroups;
