import { MyButtons } from '@/common';
import { Modal } from 'antd';
import { useState } from 'react';
import LevelsIndex from '../levels';

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

  return (
    <>
      <MyButtons.Default
        size="middle"
        onClick={() => setOpen(true)}
        title="级别配置"
      />
      <Modal
        open={open}
        onCancel={() => setOpen(false)}
        footer={null}
        width="80%"
        destroyOnClose
      >
        <LevelsIndex />
      </Modal>
    </>
  );
}
