import { useEffect, useState, Fragment } from "react"; import { Dialog, Transition } from "@headlessui/react"; import { AlertTriangle } from "lucide-react"; // ui import { Button } from "@plane/ui"; // types import type { IIssue } from "types"; type Props = { isOpen: boolean; handleClose: () => void; data: IIssue; onSubmit?: () => Promise; }; export const DeleteIssueModal: React.FC = (props) => { const { data, isOpen, handleClose, onSubmit } = props; const [isDeleteLoading, setIsDeleteLoading] = useState(false); useEffect(() => { setIsDeleteLoading(false); }, [isOpen]); const onClose = () => { setIsDeleteLoading(false); handleClose(); }; const handleIssueDelete = async () => { setIsDeleteLoading(true); if (onSubmit) await onSubmit().finally(() => setIsDeleteLoading(false)); }; return (

Delete Issue

Are you sure you want to delete issue{" "} {data?.project_detail.identifier}-{data?.sequence_id} {""}? All of the data related to the issue will be permanently removed. This action cannot be undone.

); };