import { MenuDataItem, getMenuData, getPageTitle } from '@ant-design/pro-layout';
import {  useIntl, ConnectProps, connect } from 'umi';
import React from 'react';
import { ConnectState } from '@/models/connect';
import { Layout } from 'antd';

export interface UserLayoutProps extends Partial<ConnectProps> {
  // breadcrumbNameMap: {
  //   [path: string]: MenuDataItem;
  // };
}

const RoomLayout: React.FC<UserLayoutProps> = (props) => {
  // const {
  //   route = {
  //     routes: [],
  //   },
  // } = props;
  // const { routes = [] } = route;
  const {
    children,
    // location = {
    //   pathname: '',
    // },
  } = props;
  // const { formatMessage } = useIntl();
  // const { breadcrumb } = getMenuData(routes);
  // const title = getPageTitle({
  //   pathname: location.pathname,
  //   formatMessage,
  //   breadcrumb,
  //   ...props,
  // });
  const {  Content } = Layout;
  return (
    <Layout>
      <Content>{children}</Content>
    </Layout>
  );
};

// export default connect(({ settings }: ConnectState) => ({ ...settings }))(RoomLayout);
export default RoomLayout;
