import React, { memo, useMemo } from 'react';
import { getContext, Symbols } from 'choerodon-ui/shared';
import { getPrefixCls } from '../configure/utils';
var AnchorContext = getContext(Symbols.AnchorContext, {
  getPrefixCls: getPrefixCls
});

var BaseAnchorContextProvider = function AnchorContextProvider(props) {
  var children = props.children,
      c7nAnchor = props.c7nAnchor,
      getGlobalPrefixCls = props.getPrefixCls;
  var value = useMemo(function () {
    return {
      c7nAnchor: c7nAnchor,
      getPrefixCls: getGlobalPrefixCls
    };
  }, [getGlobalPrefixCls, c7nAnchor]);
  return /*#__PURE__*/React.createElement(AnchorContext.Provider, {
    value: value
  }, children);
};

BaseAnchorContextProvider.displayName = 'AnchorContextProvider';
export var AnchorContextProvider = /*#__PURE__*/memo(BaseAnchorContextProvider);
export default AnchorContext;
//# sourceMappingURL=AnchorContext.js.map
