import { S as SandboxTerminalConnection } from '../sandbox-terminal-ChNEdHF8.js';
export { a as SandboxTerminalConnectionResponse, U as UseSandboxTerminalConnectionOptions, b as UseSandboxTerminalConnectionResult, t as tabTerminalConnectionId, u as useSandboxTerminalConnection } from '../sandbox-terminal-ChNEdHF8.js';
import { ReactNode } from 'react';

/**
 * `WorkspaceTerminalPanel` — the shared sandbox-terminal surface: a header with
 * a status badge, connect/provisioning/error states with a retry, and the lazy
 * `TerminalView` (from `@tangle-network/sandbox-ui`) mounted only once the
 * connection is live. creative-agent and gtm-agent each hand-roll a structurally
 * identical panel; only the copy and the status-tone map are app-specific, so
 * those are props and everything else lives here.
 *
 * Pair it with {@link useSandboxTerminalConnection} (the `connection` prop) and
 * {@link tabTerminalConnectionId} (the `connectionId` prop) so reloads restore
 * the same PTY and separate tabs don't evict each other.
 *
 * Styling matches the rest of `web-react`: Tailwind over the shared design
 * tokens; glyphs inline; no icon/UI library.
 */

type TerminalStatusTone = 'idle' | 'connecting' | 'connected' | 'error';
interface TerminalStatusDisplay {
    tone: TerminalStatusTone;
    label: string;
}
interface WorkspaceTerminalPanelProps {
    /** Live connection state (from {@link useSandboxTerminalConnection}). */
    connection: SandboxTerminalConnection;
    /** Stable per-tab id (from {@link tabTerminalConnectionId}) so the sidecar
     *  restores the same PTY across remounts and tabs don't collide. */
    connectionId?: string;
    /** Header title. Default "Terminal". */
    title?: string;
    /** Header subtitle / sandbox label. */
    subtitle?: string;
    /** Whether the terminal tab is visible (forwarded to `TerminalView` for fit). */
    isActive?: boolean;
    /** Reconnect handler — wire to the hook's `connect`. Shown on idle/error. */
    onRetry?: () => void;
    /** Map a `connection.status` to a badge tone + label. The default covers
     *  idle/provisioning/running/error; override for app-specific vocabulary. */
    statusDisplay?: (connection: SandboxTerminalConnection) => TerminalStatusDisplay;
    /** Extra header content, right-aligned (actions, sandbox id, …). */
    headerExtra?: ReactNode;
    className?: string;
}
declare function WorkspaceTerminalPanel({ connection, connectionId, title, subtitle, isActive, onRetry, statusDisplay, headerExtra, className, }: WorkspaceTerminalPanelProps): ReactNode;

export { SandboxTerminalConnection, type TerminalStatusDisplay, type TerminalStatusTone, WorkspaceTerminalPanel, type WorkspaceTerminalPanelProps };
