import { MyPageContainer } from '@/common';
import type { TabsProps } from 'antd';
import { Tabs } from 'antd';
import MyCategories from './categories';
import MyEvents from './events';
import MyLevels from './levels';
import MyTeams from './teams';

export default function Index({ title = '突发事件' }) {
  const items: TabsProps['items'] = [
    {
      key: 'MyEvents',
      label: '突发事件',
      children: <MyEvents />,
    },
    {
      key: 'MyTeams',
      label: '应急小组',
      children: <MyTeams />,
    },
    {
      key: 'MyCategories',
      label: '事件分类',
      children: <MyCategories />,
    },
    {
      key: 'MyLevels',
      label: '事件级别',
      children: <MyLevels />,
    },
  ];
  return (
    <MyPageContainer
      title={title}
      enableTabs={true}
      tabKey="charge-standard"
      tabLabel={title}
    >
      <Tabs type="card" defaultActiveKey="MyEvents" items={items} />
    </MyPageContainer>
  );
}
