import React, { useState } from "react"; import { Dialog, Transition } from "@headlessui/react"; // icons import { AlertTriangle } from "lucide-react"; // ui import { Button } from "@plane/ui"; // types import { useProject } from "hooks/store"; import type { TIssue } from "@plane/types"; type Props = { data: TIssue; isOpen: boolean; onClose: () => void; onSubmit: () => Promise; }; export const DeclineIssueModal: React.FC = ({ isOpen, onClose, data, onSubmit }) => { const [isDeclining, setIsDeclining] = useState(false); // hooks const { getProjectById } = useProject(); const handleClose = () => { setIsDeclining(false); onClose(); }; const handleDecline = () => { setIsDeclining(true); onSubmit().finally(() => setIsDeclining(false)); }; return (

Decline Issue

Are you sure you want to decline issue{" "} {getProjectById(data?.project_id)?.identifier}-{data?.sequence_id} {""}? This action cannot be undone.

); };