import { MyButtons } from '@/common';
import { Modal } from 'antd';
import { useState } from 'react';
import InspectionRulesIndex from '../inspection_rules';

export default function InspectionRulesModal() {
  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
      >
        <InspectionRulesIndex />
      </Modal>
    </>
  );
}
