import { jsx as _jsx } from "react/jsx-runtime";
import { AgentBrowserClaimBanner } from "./components/AgentBrowserClaimBanner";
export function useAgentBrowserCaptureUi(input) {
    const { agentId, sessionId, isClaimedByCurrentSession, isClaimedByAnotherBrowser, isPendingBrowserCaptureWait, isMutationPending, pendingCallbackId, claimBrowser, releaseBrowser, cancelBrowserCapture, } = input;
    const fixedBrowserClaimBanner = agentId && sessionId ? (_jsx(AgentBrowserClaimBanner, { variant: "fixed", isClaimedByCurrentSession: isClaimedByCurrentSession, isClaimedByAnotherBrowser: isClaimedByAnotherBrowser, isPendingBrowserCaptureWait: isPendingBrowserCaptureWait, isPending: isMutationPending, onRelease: releaseBrowser, onClaim: claimBrowser })) : null;
    const browserCaptureInlinePrompt = isPendingBrowserCaptureWait && !isClaimedByCurrentSession
        ? {
            toolNames: [
                "capture-page-screenshot",
                "capture-parhelia-ui-screenshot",
                "capture-page-dom",
            ],
            label: isClaimedByAnotherBrowser
                ? "Attached in another browser"
                : "No browser attached",
            description: isClaimedByAnotherBrowser
                ? "This capture request is waiting in another browser. Take over browser control here to continue."
                : "This capture request is waiting for a browser attachment. Attach this browser to continue.",
            actionLabel: isClaimedByAnotherBrowser
                ? "Take over browser control"
                : "Attach to this browser",
            isPending: isMutationPending,
            onAction: () => {
                claimBrowser(isClaimedByAnotherBrowser);
            },
            cancelLabel: "Cancel capture",
            onCancel: pendingCallbackId ? cancelBrowserCapture : undefined,
        }
        : undefined;
    return {
        fixedBrowserClaimBanner,
        inlineBrowserClaimBanner: null,
        browserCaptureInlinePrompt,
    };
}
//# sourceMappingURL=useAgentBrowserCaptureUi.js.map