"use client";

import { IconButton, Tooltip } from "@mui/material";
import AssignmentIcon from "@mui/icons-material/Assignment";
import DetailDialog from "./DetailDialog";
import { useState } from "react";

const TaskDetail = ({ rowId, mutate }) => {
    const [taskModal, setTaskModal] = useState(false);

    const openDetailDialog = () => {
        setTaskModal(true);
    };

    return (
        <>
            <Tooltip title="جزئیات طرح متقاضی" arrow placement="right">
                <IconButton color="primary" onClick={openDetailDialog}>
                    <AssignmentIcon />
                </IconButton>
            </Tooltip>
            <DetailDialog taskModal={taskModal} setTaskModal={setTaskModal} rowId={rowId} mutate={mutate} />
        </>
    );
};
export default TaskDetail;
