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

var BaseLayoutContextProvider = function LayoutContextProvider(props) {
  var children = props.children,
      siderHook = props.siderHook,
      getGlobalPrefixCls = props.getPrefixCls;
  var value = useMemo(function () {
    return {
      siderHook: siderHook,
      getPrefixCls: getGlobalPrefixCls
    };
  }, [getGlobalPrefixCls, siderHook]);
  return /*#__PURE__*/React.createElement(LayoutContext.Provider, {
    value: value
  }, children);
};

BaseLayoutContextProvider.displayName = 'LayoutContextProvider';
export var LayoutContextProvider = /*#__PURE__*/memo(BaseLayoutContextProvider);
export default LayoutContext;
//# sourceMappingURL=LayoutContext.js.map
