"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _button = _interopRequireDefault(require("antd/lib/button"));
var _input = _interopRequireDefault(require("antd/lib/input"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
require("./index.css");
var _react = require("react");
var _icons = require("@ant-design/icons");
var _defaultProps = _interopRequireDefault(require("./_defaultProps"));
var _proComponents = require("@ant-design/pro-components");
var _excluded = ["menus", "onSelMenu", "title", "theme"];
// type MenuItem = Required<MenuProps>['items'][number];

;
var ProLayoutComponent = function ProLayoutComponent(props) {
  var _props$menus = props.menus,
    menus = _props$menus === void 0 ? [{
      key: '1',
      icon: /*#__PURE__*/React.createElement(PieChartOutlined, null),
      children: [{}],
      label: '选项1',
      type: 'group'
    }] : _props$menus,
    onSelMenu = props.onSelMenu,
    _props$title = props.title,
    title = _props$title === void 0 ? '标题' : _props$title,
    theme = props.theme,
    others = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded);
  console.log('menus=====', menus);
  var _useState = (0, _react.useState)('/list/sub-page/sub-sub-page1'),
    pathname = _useState[0],
    setPathname = _useState[1];
  return /*#__PURE__*/React.createElement(_proComponents.ProLayout, (0, _extends2["default"])({
    splitMenus: true,
    token: {
      colorBgAppListIconHover: 'rgba(0,0,0,0.06)',
      colorTextAppListIconHover: 'rgba(255,255,255,0.95)',
      colorTextAppListIcon: 'rgba(255,255,255,0.85)',
      sider: {
        colorBgCollapsedButton: '#fff',
        colorTextCollapsedButtonHover: 'rgba(0,0,0,0.65)',
        colorTextCollapsedButton: 'rgba(0,0,0,0.45)',
        colorMenuBackground: '#004FD9',
        colorBgMenuItemCollapsedElevated: 'rgba(0,0,0,0.85)',
        colorMenuItemDivider: 'rgba(255,255,255,0.15)',
        colorBgMenuItemHover: 'rgba(0,0,0,0.06)',
        colorBgMenuItemSelected: 'rgba(0,0,0,0.15)',
        colorTextMenuSelected: '#fff',
        colorTextMenuItemHover: 'rgba(255,255,255,0.75)',
        colorTextMenu: 'rgba(255,255,255,0.75)',
        colorTextMenuSecondary: 'rgba(255,255,255,0.65)',
        colorTextMenuTitle: 'rgba(255,255,255,0.95)',
        colorTextMenuActive: 'rgba(255,255,255,0.95)',
        colorTextSubMenuSelected: '#fff'
      }
    }
  }, _defaultProps["default"], {
    location: {
      pathname: pathname
    },
    avatarProps: {
      src: 'https://gw.alipayobjects.com/zos/antfincdn/efFD%24IOql2/weixintupian_20170331104822.jpg',
      size: 'small',
      title: '七妮妮'
    },
    actionsRender: function actionsRender(props) {
      if (props.isMobile) return [];
      return [props.layout !== 'side' ? /*#__PURE__*/React.createElement("div", {
        key: "SearchOutlined",
        "aria-hidden": true,
        style: {
          display: 'flex',
          alignItems: 'center',
          marginInlineEnd: 24
        },
        onMouseDown: function onMouseDown(e) {
          e.stopPropagation();
          e.preventDefault();
        }
      }, /*#__PURE__*/React.createElement(_input["default"], {
        style: {
          borderRadius: 4,
          marginInlineEnd: 12,
          backgroundColor: 'rgba(0,0,0,0.03)'
        },
        prefix: /*#__PURE__*/React.createElement(_icons.SearchOutlined, {
          style: {
            color: 'rgba(0, 0, 0, 0.15)'
          }
        }),
        placeholder: "\u641C\u7D22\u65B9\u6848",
        bordered: false
      }), /*#__PURE__*/React.createElement(_icons.PlusCircleFilled, {
        style: {
          color: 'var(--ant-primary-color)',
          fontSize: 24
        }
      })) : undefined, /*#__PURE__*/React.createElement(_icons.InfoCircleFilled, {
        key: "InfoCircleFilled"
      }), /*#__PURE__*/React.createElement(_icons.QuestionCircleFilled, {
        key: "QuestionCircleFilled"
      }), /*#__PURE__*/React.createElement(_icons.GithubFilled, {
        key: "GithubFilled"
      })];
    },
    menuFooterRender: function menuFooterRender(props) {
      if (props !== null && props !== void 0 && props.collapsed) return undefined;
      return /*#__PURE__*/React.createElement("p", {
        style: {
          textAlign: 'center',
          paddingBlockStart: 12
        }
      }, "Power by Ant Design");
    },
    onMenuHeaderClick: function onMenuHeaderClick(e) {
      return console.log(e);
    },
    menuItemRender: function menuItemRender(item, dom) {
      return /*#__PURE__*/React.createElement("a", {
        onClick: function onClick() {
          setPathname(item.path || '/welcome');
        }
      }, dom);
    }
  }), /*#__PURE__*/React.createElement(_proComponents.PageContainer, {
    extra: [/*#__PURE__*/React.createElement(_button["default"], {
      key: "3"
    }, "\u64CD\u4F5C"), /*#__PURE__*/React.createElement(_button["default"], {
      key: "2"
    }, "\u64CD\u4F5C"), /*#__PURE__*/React.createElement(_button["default"], {
      key: "1",
      type: "primary"
    }, "\u4E3B\u64CD\u4F5C")],
    footer: [/*#__PURE__*/React.createElement(_button["default"], {
      key: "3"
    }, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(_button["default"], {
      key: "2",
      type: "primary"
    }, "\u63D0\u4EA4")]
  }, /*#__PURE__*/React.createElement(_proComponents.ProCard, {
    style: {
      height: '200vh',
      minHeight: 800
    }
  }, /*#__PURE__*/React.createElement("div", null))));
};
var _default = ProLayoutComponent;
exports["default"] = _default;