import { MonkPicture, TaskName } from '@monkvision/types'; import { Queue } from '@monkvision/common'; import { PictureUpload } from './useUploadQueue'; import { AddDamageHandle } from './useAddDamageMode'; import { PhotoCaptureSightState, DamageDisclosureState } from '../types'; /** * Parameters of the usePictureTaken hook. */ export interface UseTakePictureParams { /** * The capture state, created using the usePhotoCaptureSightState or useDamageDisclosureState hook. */ captureState: PhotoCaptureSightState | DamageDisclosureState; /** * The PhotoCapture add damage handle, created using the useAddDamageMode hook. */ addDamageHandle: AddDamageHandle; /** * Photo capture upload queue, created using the useUploadQueue hook. */ uploadQueue: Queue; /** * Record associating each sight to a list of tasks to execute for it. If not provided, the default tasks of the sight * will be used. */ tasksBySight?: Record; /** * User defined callback that can be called when a picture has been taken in the PhotoCapture process. */ onPictureTaken?: (picture: MonkPicture) => void; } /** * Callback called when the user has taken a picture. */ export type HandleTakePictureFunction = (picture: MonkPicture) => void; /** * Custom hook used to generate the callback called when the user has taken a picture to handle picture upload etc. */ export declare function usePictureTaken({ captureState, addDamageHandle, uploadQueue, tasksBySight, onPictureTaken, }: UseTakePictureParams): HandleTakePictureFunction;