import { useRef } from "react"; import type { SightingType } from "../../../utils/types"; export const useCreateVideoSnapshot = (mostRecentSighting: SightingType) => { const latestBitMapRef = useRef(null); const snapshotUrl = mostRecentSighting?.overviewUrl; const image = new Image(); image.src = snapshotUrl; const plateRect = mostRecentSighting?.overviewPlateRect; const plateTrack = mostRecentSighting?.plateTrack; return { snapshotUrl, latestBitMapRef, image, plateRect, plateTrack }; };