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

var BaseLayoutSiderContextProvider = function LayoutSiderContextProvider(props) {
  var children = props.children,
      siderCollapsed = props.siderCollapsed,
      collapsedWidth = props.collapsedWidth,
      getGlobalPrefixCls = props.getPrefixCls;
  var value = useMemo(function () {
    return {
      siderCollapsed: siderCollapsed,
      collapsedWidth: collapsedWidth,
      getPrefixCls: getGlobalPrefixCls
    };
  }, [getGlobalPrefixCls, siderCollapsed, collapsedWidth]);
  return /*#__PURE__*/React.createElement(LayoutSiderContext.Provider, {
    value: value
  }, children);
};

BaseLayoutSiderContextProvider.displayName = 'LayoutSiderContextProvider';
export var LayoutSiderContextProvider = /*#__PURE__*/memo(BaseLayoutSiderContextProvider);
export default LayoutSiderContext;
//# sourceMappingURL=LayoutSiderContext.js.map
