import { MonkApiConfig } from '@monkvision/network'; import { LoadingState } from '@monkvision/common'; import { Image } from '@monkvision/types'; /** * Checks whether the inspection already has enough car coverage based on the alpha values of its * images. The 360° space is split into 6 equal buckets (60° each), and each bucket must contain at * least 1 image for the coverage to be considered sufficient. * * @param images The images to evaluate. */ export declare function hasEnoughCarCoverage(images: Image[]): boolean; /** * Params accepted by the useGetInspection hook. */ export interface UseGetInspectionParams { /** * The ID of the inspection to fetch. */ inspectionId: string; /** * The api config used to communicate with the API. */ apiConfig: MonkApiConfig; /** * Global loading state of the VideoCapture component. */ loading: LoadingState; /** * Whether hybrid video mode is enabled. Used to determine if video can be skipped. */ enableHybridVideo: boolean; /** * Callback called when the inspection is found to be already completed. */ onCompleted?: () => void; /** * Callback called when the coverage check determines the video step should be skipped. */ onShouldSkipVideo?: () => void; } /** * Return value of the useGetInspection hook. */ export interface UseGetInspectionResult { /** * Whether the inspection is completed (has any task with status other than NOT_STARTED). */ isInspectionCompleted: boolean; /** * Whether the video step should be skipped because the inspection already has enough car coverage. */ shouldSkipVideo: boolean; } /** * Custom hook that fetches the inspection details when the VideoCapture component mounts. * This ensures the inspection data is available in the Monk state for the video capture process. * It also determines if the inspection is already completed by checking task statuses, * and whether the video capture can be skipped based on existing 360° car coverage. * When coverage is insufficient and the inspection is not completed, existing images are deleted. */ export declare function useGetInspection({ inspectionId, apiConfig, loading, enableHybridVideo, onCompleted, onShouldSkipVideo, }: UseGetInspectionParams): UseGetInspectionResult;