import React, { createContext, useContext } from 'react';
import { areOneHierarchyUris } from '@reltio/mdm-sdk';
var AutoExpandedAttributesContext = createContext(null);
export var AutoExpandedAttributesProvider = function (_a) {
    var children = _a.children, attributeUris = _a.attributeUris;
    return (React.createElement(AutoExpandedAttributesContext.Provider, { value: attributeUris }, children));
};
export var useAttributeAutoExpanded = function (attributeUri) {
    var expandedAttributes = useContext(AutoExpandedAttributesContext) || [];
    return expandedAttributes.some(function (uri) { return areOneHierarchyUris(uri, attributeUri); });
};
