import * as react from 'react';
import { JSX } from 'react';
import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
import { useTranslation, AgentGuiI18nLocale } from '../i18n/index.js';
import { W as WorkspaceLinkAction } from '../workspaceLinkActions-Bwa-phu8.js';
import { AgentActivityNeedsAttentionItem, AgentActivitySnapshot } from '@tutti-os/agent-activity-core';
import { n as WorkspaceAgentActivityStatus } from '../workspaceAgentActivityListViewModel-PvLQDj60.js';
import '@tutti-os/workspace-issue-manager/core';

interface AgentApprovalOptionVM {
    id: string;
    label: string;
    kind: string;
    description?: string;
}
interface AgentApprovalItemVM {
    kind: "approval";
    id: string;
    turnId: string;
    requestId: string;
    callId: string;
    title: string;
    toolName: string | null;
    status: string | null;
    input: Record<string, unknown> | null;
    options: AgentApprovalOptionVM[];
    output?: Record<string, unknown> | null;
    occurredAtUnixMs: number | null;
}

interface AgentAskUserQuestionOptionVM {
    label: string;
    description: string;
}
interface AgentAskUserQuestionVM {
    id: string;
    header: string;
    question: string;
    options: AgentAskUserQuestionOptionVM[];
    multiSelect: boolean;
    answer?: string | string[] | null;
}

type AgentConversationPromptVM = AgentApprovalItemVM | {
    kind: "ask-user";
    requestId: string;
    title: string;
    questions: AgentAskUserQuestionVM[];
} | {
    kind: "exit-plan";
    requestId: string;
    title: string;
};

interface WorkspaceAgentMessageCenterModel {
    waitingCount: number;
    items: WorkspaceAgentMessageCenterItem[];
    counts: WorkspaceAgentMessageCenterCounts;
}
interface WorkspaceAgentMessageCenterCounts {
    all: number;
    working: number;
    waiting: number;
    completed: number;
    failed: number;
}
interface WorkspaceAgentMessageCenterItem {
    id: string;
    agentSessionId: string;
    provider: string;
    userId: string | null;
    title: string;
    identity: WorkspaceAgentMessageCenterIdentity | null;
    cwd: string;
    status: WorkspaceAgentActivityStatus;
    lastAgentMessageSummary: string;
    lastAgentMessageAtUnixMs: number | null;
    pendingPrompt: AgentConversationPromptVM | null;
    needsAttentionKind: AgentActivityNeedsAttentionItem["kind"] | null;
    needsAttentionSummary: string | null;
    sortTimeUnixMs: number;
}
interface BuildWorkspaceAgentMessageCenterOptions {
    avoidGroupingEdits?: boolean;
    identityBySessionId?: Record<string, WorkspaceAgentMessageCenterIdentity>;
    promptFallbackLabels?: WorkspaceAgentMessageCenterPromptFallbackLabels;
    workspaceRoot?: string | null;
}
interface WorkspaceAgentMessageCenterIdentity {
    userName: string;
    userAvatarUrl?: string;
    agentName: string;
    agentAvatarUrl?: string;
}
interface WorkspaceAgentMessageCenterPromptFallbackLabels {
    constraintHeader: string;
    inputHeader: string;
    question: string;
    title: string;
}
declare function buildWorkspaceAgentMessageCenterModel(snapshot: AgentActivitySnapshot, options?: BuildWorkspaceAgentMessageCenterOptions): WorkspaceAgentMessageCenterModel;
declare function isWaitingMessageCenterItem(item: WorkspaceAgentMessageCenterItem): boolean;

interface WorkspaceAgentMessageCenterCardProps {
    item: WorkspaceAgentMessageCenterItem;
    cardRef?: (node: HTMLElement | null) => void;
    highlighted?: boolean;
    isSubmitting: boolean;
    onLinkAction?: (action: WorkspaceLinkAction) => void;
    onOpenChat: (input: {
        agentSessionId: string;
        provider: string;
    }) => void;
    onSubmitPrompt: (input: {
        action?: string;
        optionId?: string;
        payload?: Record<string, unknown>;
        requestId: string;
    }) => void;
}
declare function WorkspaceAgentMessageCenterCard({ cardRef, highlighted, item, isSubmitting, onLinkAction, onOpenChat, onSubmitPrompt }: WorkspaceAgentMessageCenterCardProps): JSX.Element;
declare function buildWorkspaceAgentInteractivePromptLabels(t: ReturnType<typeof useTranslation>["t"], provider?: string): {
    approvalLead: string;
    planLead: string;
    planModes: {
        id: string;
        label: string;
        description: string;
    }[];
    stayInPlan: string;
    sendFeedback: string;
    feedbackPlaceholder: string;
    previousQuestion: string;
    nextQuestion: string;
    submitAnswers: string;
    answerPlaceholder: string;
    waitingForAnswer: string;
};

interface WorkspaceAgentMessageCenterPanelProps {
    i18n?: I18nRuntime<string> | null;
    locale?: AgentGuiI18nLocale;
    open: boolean;
    model: WorkspaceAgentMessageCenterModel;
    highlightedItemId?: string | null;
    portalContainer?: HTMLElement | null;
    onClose: () => void;
    onHighlightedItemSettled?: (itemId: string) => void;
    onLinkAction?: (action: WorkspaceLinkAction) => void;
    onNotificationActioned?: (input: {
        action: string;
        provider: string;
    }) => void;
    onOpenChat: (input: {
        agentSessionId: string;
        provider: string;
    }) => void;
    onSubmitPrompt: (input: {
        action?: string;
        agentSessionId: string;
        optionId?: string;
        payload?: Record<string, unknown>;
        requestId: string;
    }) => Promise<void> | void;
}
declare const WorkspaceAgentMessageCenterPanel: react.NamedExoticComponent<WorkspaceAgentMessageCenterPanelProps>;

interface AgentInteractivePromptSurfaceProps {
    prompt: AgentConversationPromptVM;
    edgeGlow?: boolean;
    keyboardShortcuts?: boolean;
    isSubmitting: boolean;
    onSubmit: (input: {
        requestId: string;
        action?: string;
        optionId?: string;
        payload?: Record<string, unknown>;
    }) => void;
    labels: {
        approvalLead: string;
        planLead: string;
        planModes: Array<{
            id: string;
            label: string;
            description: string;
        }>;
        stayInPlan: string;
        sendFeedback: string;
        feedbackPlaceholder: string;
        previousQuestion: string;
        nextQuestion: string;
        submitAnswers: string;
        answerPlaceholder: string;
        waitingForAnswer: string;
    };
}
declare function AgentInteractivePromptSurface({ prompt, edgeGlow, embedded, keyboardShortcuts, isSubmitting, onSubmit, labels }: AgentInteractivePromptSurfaceProps & {
    embedded?: boolean;
}): JSX.Element | null;

declare function managedAgentRoundedIconUrl(provider: string | undefined): string;

interface PromptToolDetail {
    kind: "command" | "path" | "query";
    value: string;
    meta?: string;
}
declare function getPromptToolDetails(input: Record<string, unknown> | null): PromptToolDetail[];
declare function isPromptRequestIdTitle(value: string): boolean;

declare function approvalOptionDisplayLabel(option: {
    id: string;
    kind: string;
    label: string;
}, intent?: {
    feedback?: boolean;
}): string;

export { AgentInteractivePromptSurface, type BuildWorkspaceAgentMessageCenterOptions, type PromptToolDetail, WorkspaceAgentMessageCenterCard, type WorkspaceAgentMessageCenterCardProps, type WorkspaceAgentMessageCenterCounts, type WorkspaceAgentMessageCenterIdentity, type WorkspaceAgentMessageCenterItem, type WorkspaceAgentMessageCenterModel, WorkspaceAgentMessageCenterPanel, type WorkspaceAgentMessageCenterPanelProps, approvalOptionDisplayLabel, buildWorkspaceAgentInteractivePromptLabels, buildWorkspaceAgentMessageCenterModel, getPromptToolDetails, isPromptRequestIdTitle, isWaitingMessageCenterItem, managedAgentRoundedIconUrl };
