export interface UseThreadStatusOptions { threadId?: string; } export interface ThreadStatusState { /** * Marks the discussion over and resolves to whether that landed. Absent where there * is no thread to resolve yet, or no editor to send it through. */ resolve?: () => Promise; /** Reopens a resolved thread. Absent on the same terms as `resolve`. */ reopen?: () => Promise; /** A change of status is in flight. */ saving: boolean; /** The last change of status did not land. */ failed: boolean; } /** * Resolving a thread, and reopening one that was resolved. * * Anyone who can comment can do either, so the thread view offers it to every reader * rather than to whoever started the discussion. The thread that comes back goes into * the page's loaded listing, so the trigger and the header agree on the new status * without another fetch. */ export declare function useThreadStatus({ threadId }: UseThreadStatusOptions): ThreadStatusState;