import React, { useState } from "react"; // headless ui import { Dialog, Transition } from "@headlessui/react"; // icons import { ExclamationTriangleIcon } from "@heroicons/react/24/outline"; // ui import { SecondaryButton, DangerButton } from "components/ui"; // types import type { IInboxIssue } from "types"; type Props = { isOpen: boolean; handleClose: () => void; data: IInboxIssue | undefined; onSubmit: () => Promise; }; export const DeclineIssueModal: React.FC = ({ isOpen, handleClose, data, onSubmit }) => { const [isDeclining, setIsDeclining] = useState(false); const onClose = () => { setIsDeclining(false); handleClose(); }; const handleDecline = () => { setIsDeclining(true); onSubmit().finally(() => setIsDeclining(false)); }; return (

Decline Issue

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

Cancel {isDeclining ? "Declining..." : "Decline Issue"}
); };