import _extends from "@babel/runtime/helpers/extends";
import _Button from "antd/es/button";
import _Input from "antd/es/input";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["menus", "onSelMenu", "title", "theme"];
import "./index.css";
import { useState } from 'react';
import { GithubFilled, InfoCircleFilled, PlusCircleFilled, QuestionCircleFilled, SearchOutlined } from '@ant-design/icons';
import defaultProps from "./_defaultProps";
import { PageContainer, ProCard, ProLayout } from '@ant-design/pro-components';

// 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 = _objectWithoutPropertiesLoose(props, _excluded);
  console.log('menus=====', menus);
  var _useState = useState('/list/sub-page/sub-sub-page1'),
    pathname = _useState[0],
    setPathname = _useState[1];
  return /*#__PURE__*/React.createElement(ProLayout, _extends({
    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, {
    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, {
        style: {
          borderRadius: 4,
          marginInlineEnd: 12,
          backgroundColor: 'rgba(0,0,0,0.03)'
        },
        prefix: /*#__PURE__*/React.createElement(SearchOutlined, {
          style: {
            color: 'rgba(0, 0, 0, 0.15)'
          }
        }),
        placeholder: "\u641C\u7D22\u65B9\u6848",
        bordered: false
      }), /*#__PURE__*/React.createElement(PlusCircleFilled, {
        style: {
          color: 'var(--ant-primary-color)',
          fontSize: 24
        }
      })) : undefined, /*#__PURE__*/React.createElement(InfoCircleFilled, {
        key: "InfoCircleFilled"
      }), /*#__PURE__*/React.createElement(QuestionCircleFilled, {
        key: "QuestionCircleFilled"
      }), /*#__PURE__*/React.createElement(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(PageContainer, {
    extra: [/*#__PURE__*/React.createElement(_Button, {
      key: "3"
    }, "\u64CD\u4F5C"), /*#__PURE__*/React.createElement(_Button, {
      key: "2"
    }, "\u64CD\u4F5C"), /*#__PURE__*/React.createElement(_Button, {
      key: "1",
      type: "primary"
    }, "\u4E3B\u64CD\u4F5C")],
    footer: [/*#__PURE__*/React.createElement(_Button, {
      key: "3"
    }, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(_Button, {
      key: "2",
      type: "primary"
    }, "\u63D0\u4EA4")]
  }, /*#__PURE__*/React.createElement(ProCard, {
    style: {
      height: '200vh',
      minHeight: 800
    }
  }, /*#__PURE__*/React.createElement("div", null))));
};
export default ProLayoutComponent;