"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
require("core-js/modules/es.array.iterator.js");
require("core-js/modules/web.dom-collections.iterator.js");
var _react = require("react");
var _utils = require("../../utils");
const useCurrentMenuLayoutProps = currentMenu => {
  const [currentMenuLayoutProps, setCurrentMenuLayoutProps] = (0, _react.useState)({});
  (0, _react.useEffect)(() => {
    setCurrentMenuLayoutProps((0, _utils.omitUndefined)({
      // 有时候会变成对象，是原来的方式
      layout: typeof currentMenu.layout !== 'object' ? currentMenu.layout : undefined,
      navTheme: currentMenu.navTheme,
      menuRender: currentMenu.menuRender,
      footerRender: currentMenu.footerRender,
      menuHeaderRender: currentMenu.menuHeaderRender,
      headerRender: currentMenu.headerRender,
      fixSiderbar: currentMenu.fixSiderbar,
      headerTheme: currentMenu.headerTheme
    }));
  }, [currentMenu.layout, currentMenu.navTheme, currentMenu.menuRender, currentMenu.footerRender, currentMenu.menuHeaderRender, currentMenu.headerRender, currentMenu.fixSiderbar, currentMenu.headerTheme]);
  return currentMenuLayoutProps;
};
var _default = useCurrentMenuLayoutProps;
exports.default = _default;