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