import { Button, Drawer } from "antd";
import { useState } from "react";
import NotificationPermissionControl from "./NotificationPermissionContorl";
import { NotificationOutlined } from "@ant-design/icons";

const PermissionControlPanel = () => {
  const [open, setOpen] = useState(false);
  return (
    <>
      <Button block icon={<NotificationOutlined />} onClick={() => setOpen(true)}>权限设置</Button>
      <Drawer
        open={open}
        placement="bottom"
        title={'权限设置'}
        onClose={() => setOpen(false)}
      >
        <NotificationPermissionControl />
      </Drawer>
    </>
  );
}

export default PermissionControlPanel;
