import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { TriangleAlert } from "lucide-react";
import { useRef } from "react";
import { VModal, VModalTitle, VModalFooter } from "./shadcn";
import { Button } from "./shadcn/button";
export function ConfirmModal({ title, content, onConfirm, onCancel, isOpen }) {
    const cancelButtonRef = useRef(null);
    return (_jsxs(VModal, { isOpen: isOpen, onClose: onCancel, description: "Confirm Modal", children: [_jsxs("div", { className: "sm:flex sm:items-start p-2", children: [_jsx("div", { className: "mx-auto flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10", children: _jsx(TriangleAlert, { className: "size-6 text-red-600", "aria-hidden": "true" }) }), _jsxs("div", { className: "mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left", children: [_jsx(VModalTitle, { className: "leading-6", show: true, children: title }), _jsx("div", { className: "mt-2", children: _jsx("div", { className: "prose text-sm text-gray-500", children: content }) })] })] }), _jsxs(VModalFooter, { align: "right", children: [_jsx(Button, { variant: "destructive", onClick: onConfirm, children: "Confirm" }), _jsx(Button, { variant: "outline", onClick: onCancel, ref: cancelButtonRef, children: "Cancel" })] })] }));
}
//# sourceMappingURL=ConfirmModal.js.map