import { LoadingState } from '@monkvision/common'; import { PhotoCaptureAppConfig } from '@monkvision/types'; import { StartTasksFunction } from '../../hooks'; import { PhotoCaptureSightState } from './usePhotoCaptureSightState'; /** * Parameters of the useInspectionComplete hook. */ export interface InspectionCompleteParams extends Pick { /** * Callback called when the user has started the inspection tasks. */ startTasks: StartTasksFunction; /** * The sight state, created using the usePhotoCaptureSightState hook. */ sightState: PhotoCaptureSightState; /** * Global loading state of the PhotoCapture component. */ loading: LoadingState; /** * Callback called when the user updates the duration of the inspection capture. */ onUpdateDuration: (forceUpdate?: boolean) => Promise; /** * Function returning a promise that resolves when every pending image deletion request has settled. */ cleanupImages: () => Promise; /** * Callback called when the user clicks on the "Complete" button in the HUD. */ onComplete?: () => void; } /** * Handle used to manage the completion of the inspection. */ export interface InspectionCompleteHandle { /** * Callback called when the user has completed the inspection. */ handleInspectionCompleted: () => void; } /** * Custom hook used to generate the callback called when the user has completed the inspection. */ export declare function useInspectionComplete({ startTasks, sightState, loading, startTasksOnComplete, onUpdateDuration, cleanupImages, onComplete, }: InspectionCompleteParams): InspectionCompleteHandle;