import { Button } from "@mui/material";
import AddCircleIcon from "@mui/icons-material/AddCircle";
import { useState } from "react";
import InquiryPrivacyFencingCreate from "@/components/dashboard/inquiryPrivacyFencing/Create";

const Toolbar = ({ mutate }) => {
    const [open, setOpen] = useState(false);

    const handleOpen = () => {
        setOpen(true);
    };

    const handleClose = () => {
        setOpen(false);
    };

    return (
        <>
            <Button variant="contained" color="primary2" startIcon={<AddCircleIcon />} onClick={handleOpen}>
                ایجاد پاسخ به استعلام
            </Button>
            <InquiryPrivacyFencingCreate open={open} handleClose={handleClose} mutate={mutate} />
        </>
    );
};
export default Toolbar;
