import { useCallback } from "react";
export function useAgentPromptQueueSocketHandler(input) {
    const { actions, shouldSuppressQueuedPrompt } = input;
    return useCallback((messageType, payload) => {
        if (messageType === "agent:prompt:queued") {
            const queueEntry = payload?.queueEntry;
            if (queueEntry && !shouldSuppressQueuedPrompt(queueEntry)) {
                actions.addQueuedPrompt(queueEntry);
            }
            return true;
        }
        if (messageType === "agent:prompt:processed") {
            const promptId = payload?.promptId;
            if (promptId) {
                actions.processQueuedPrompt(promptId);
            }
            return true;
        }
        return false;
    }, [actions, shouldSuppressQueuedPrompt]);
}
//# sourceMappingURL=useAgentPromptQueueSocketHandler.js.map