import { type Component } from "@oh-my-pi/pi-tui";
import type { AgentSession } from "../../../session/agent-session.js";
import type { CollabStatus, EffectiveStatusLineSettings, StatusLineSettings } from "./types.js";
export declare class StatusLineComponent implements Component {
    #private;
    private session;
    constructor(session: AgentSession);
    /**
     * Re-point the status line at another session (focus proxy). Invalidate: model/context/usage all derive
     * from it. `focusedAgentId` is the focused subagent id while the view is proxied, undefined for main.
     */
    setSession(session: AgentSession, focusedAgentId?: string): void;
    updateSettings(settings: StatusLineSettings): void;
    getEffectiveSettingsForTest(): EffectiveStatusLineSettings;
    setAutoCompactEnabled(enabled: boolean): void;
    setSubagentCount(count: number): void;
    /**
     * Compatibility shim for callers predating the simplified subagent badge.
     * The status line now intentionally shows only the active count.
     */
    setSubagentHubHint(_hint: string | undefined): void;
    /** Active subagent count as currently displayed (collab state mirroring). */
    get subagentCount(): number;
    /**
     * Reset the currently-attached session's active-time accumulators so
     * the `time_spent` segment starts from zero. Called from `/clear`,
     * fresh-session, and joined-collab paths; both the completed
     * accumulator and any in-flight window are dropped, so a reset
     * mid-turn ignores the running window (the matching `markActivityEnd`
     * will see an idle meter and no-op).
     */
    resetActiveTime(): void;
    /**
     * Mark the currently-attached session as having started a unit of
     * active processing. Idempotent: a second start while a window is
     * already open is a no-op, so reentrant `agent_start` events (e.g.
     * nested auto-compaction loops, focus-controller mid-turn attach onto
     * an already-running window) do not double-count.
     */
    markActivityStart(): void;
    /**
     * Close the currently-attached session's open active-processing
     * window, folding its elapsed time into the accumulator. Idempotent
     * when the meter is already idle so callers can fire it on every
     * `agent_end` without guarding.
     */
    markActivityEnd(): void;
    /**
     * Snapshot of total active-processing time for the currently-attached
     * session, including any in-flight window. Exposed for the segment
     * context builder; tests assert against this too.
     */
    getActiveMs(): number;
    setPlanModeStatus(status: {
        enabled: boolean;
        paused: boolean;
    } | undefined): void;
    setLoopModeStatus(status: {
        enabled: boolean;
    } | undefined): void;
    setGoalModeStatus(status: {
        enabled: boolean;
        paused: boolean;
    } | undefined): void;
    setCollabStatus(status: CollabStatus | null): void;
    setHookStatus(key: string, text: string | undefined): void;
    watchBranch(onBranchChange: () => void): void;
    dispose(): void;
    invalidate(): void;
    /**
     * Startup redraws only arm a short-delayed task; timeout releases the render
     * cadence while a late successful fetch can still refresh the cached segment.
     */
    refreshUsageInBackground(): void;
    /**
     * Used-tokens / context-window totals for the status-line context% segment,
     * memoized so the per-event redraw stays O(1) when nothing changed.
     *
     * The numerator comes from `session.getContextUsage()`, which anchors on the
     * last assistant's real prompt-token count — so the bar matches the provider
     * and the `/context` panel — and reports `null` while that count is unknown
     * (right after compaction, before the next response). Exposed (non-private)
     * for unit tests and the collab host's state broadcast.
     */
    getCachedContextBreakdown(): {
        usedTokens: number;
        contextWindow: number;
    };
    getTopBorder(width: number): {
        content: string;
        width: number;
    };
    render(width: number): readonly string[];
}
