Parameters
- authState: { accessToken: null | string }
Returns {
    isLoading: boolean;
    progress: MatchingProgress;
    statusMessage: string;
    detailMessage: null | string;
    error: null | string;
    detailedError: null | ApiError;
    timeEstimate: TimeEstimate;
    bypassCache: boolean;
    freshSearch: boolean;
    isCancelling: boolean;
    isInitializing: boolean;
    isCacheClearing: boolean;
    cacheClearingCount: number;
    cancelMatchingRef: RefObject<boolean>;
    matchingInitialized: RefObject<boolean>;
    setError: Dispatch<SetStateAction<null | string>>;
    setDetailedError: Dispatch<SetStateAction<null | ApiError>>;
    setIsLoading: Dispatch<SetStateAction<boolean>>;
    setProgress: Dispatch<SetStateAction<MatchingProgress>>;
    setStatusMessage: Dispatch<SetStateAction<string>>;
    setDetailMessage: Dispatch<SetStateAction<null | string>>;
    setBypassCache: Dispatch<SetStateAction<boolean>>;
    setFreshSearch: Dispatch<SetStateAction<boolean>>;
    setIsCancelling: Dispatch<SetStateAction<boolean>>;
    setIsInitializing: Dispatch<SetStateAction<boolean>>;
    setIsCacheClearing: Dispatch<SetStateAction<boolean>>;
    setCacheClearingCount: Dispatch<SetStateAction<number>>;
    startMatching: (
        mangaList: KenmeiManga[],
        forceSearch?: boolean,
        setMatchResults?: Dispatch<SetStateAction<MangaMatchResult[]>>,
    ) => Promise<void>;
    handleResumeMatching: (
        matchResults: MangaMatchResult[],
        setMatchResults: Dispatch<SetStateAction<MangaMatchResult[]>>,
    ) => void;
    handleCancelResume: () => void;
    handleCancelProcess: () => void;
    completeInitialization: () => void;
}
An object containing state, progress, error, and handler functions for the matching process.
Custom hook to manage the manga matching process, including batch matching, progress tracking, error handling, and resume/cancel operations.
Example
Source