import { MyButtons } from '@/common';
import { Modal } from 'antd';
import { useState } from 'react';
import QuestionCategoriesList from '../components/QuestionCategoriesList';

export default function QuestionCategoriesManage() {
  const [open, setOpen] = useState(false);

  return (
    <>
      <MyButtons.Default
        title="题目分类配置"
        size="middle"
        onClick={() => setOpen(true)}
      />
      <Modal
        title="题目分类配置"
        open={open}
        onCancel={() => setOpen(false)}
        footer={null}
        width="85%"
        style={{ top: 20 }}
        destroyOnClose
      >
        <div style={{ maxHeight: 'calc(100vh - 200px)', overflow: 'auto' }}>
          <QuestionCategoriesList />
        </div>
      </Modal>
    </>
  );
}
