import { MyPageContainer } from '@/common';
import type { TabsProps } from 'antd';
import { Tabs } from 'antd';
import MyQuestionCategoriesList from './components/QuestionCategoriesList';
import MyQuestionsList from './components/QuestionsList';
import MySurveyReleasesList from './components/SurveyReleasesList';
import MySurveyResponsesList from './components/SurveyResponsesList';
import MySurveysList from './components/SurveysList';
export default function Index({ title = '问卷调查' }) {
  const items: TabsProps['items'] = [
    {
      key: 'MySurveyReleasesList',
      label: '问卷发布',
      children: <MySurveyReleasesList />,
    },
    {
      key: 'MySurveyResponsesList',
      label: '问卷回收',
      children: <MySurveyResponsesList />,
    },
    {
      key: 'MySurveysList',
      label: '问卷设置',
      children: <MySurveysList />,
    },
    {
      key: 'MyQuestionsList',
      label: '题库设置',
      children: <MyQuestionsList />,
    },
    {
      key: 'MyQuestionCategoriesList',
      label: '题目分类',
      children: <MyQuestionCategoriesList />,
    },
  ];
  return (
    <MyPageContainer
      title={title}
      enableTabs={true}
      tabKey="marketing-survey"
      tabLabel={title}
    >
      <Tabs type="card" items={items} />
    </MyPageContainer>
  );
}
