import { toast } from "sonner"; import { useCameraFeedContext } from "../../../../../app/context/CameraFeedContext"; import { useBlackBoard } from "../../../../../hooks/useBlackBoard"; import ModalComponent from "../../../../../ui/ModalComponent"; type ResetAllModalProps = { isResetAllModalOpen: boolean; handleClose: () => void; }; const ResetAllModal = ({ isResetAllModalOpen, handleClose }: ResetAllModalProps) => { const { state, dispatch } = useCameraFeedContext(); const { blackboardMutation } = useBlackBoard(); const handleResetAll = async () => { dispatch({ type: "RESET_CAMERA_FEED" }); handleClose(); const result = await blackboardMutation.mutateAsync({ operation: "INSERT", path: `cameraFeed`, value: state, }); // Need endpoint to reset all target detection painted cells if (result?.reason === "OK") { toast.success("All camera settings have been reset to default values."); } }; return (

Reset All Camera Settings

Are you sure you want to reset all camera settings to their default values? This action cannot be undone.

); }; export default ResetAllModal;