import { isBrowserCaptureDialogType, useAgentBrowserCapture, } from "./useAgentBrowserCapture";
import { useAgentBrowserCaptureUi } from "./useAgentBrowserCaptureUi";
export { isBrowserCaptureDialogType };
export function useAgentBrowserCapturePanel(input) {
    const { agentId, agentStatus, sessionId, metadata, setMetadata, setMutationPending, sanitizeMetadata, terminalInstanceIdRef, showErrorToast, mutationPending, } = input;
    const capture = useAgentBrowserCapture({
        agentId,
        agentStatus,
        sessionId,
        metadata,
        setMetadata,
        setMutationPending,
        sanitizeMetadata,
        terminalInstanceIdRef,
        showErrorToast,
    });
    const ui = useAgentBrowserCaptureUi({
        agentId,
        sessionId,
        isClaimedByCurrentSession: capture.isClaimedByCurrentSession,
        isClaimedByAnotherBrowser: capture.isClaimedByAnotherBrowser,
        isPendingBrowserCaptureWait: capture.isPendingBrowserCaptureWait,
        isMutationPending: mutationPending,
        pendingCallbackId: capture.pendingCallbackId,
        claimBrowser: capture.claimBrowser,
        releaseBrowser: capture.releaseBrowser,
        cancelBrowserCapture: () => {
            void capture.cancelBrowserCapture();
        },
    });
    return {
        ...capture,
        ...ui,
    };
}
//# sourceMappingURL=useAgentBrowserCapturePanel.js.map