/**
 * @param {number | null} bytes
 * @returns {string}
 */
export function formatBytes(bytes: number | null): string;
/**
 * @param {number} ageSeconds
 * @returns {string}
 */
export function formatRelativeAge(ageSeconds: number): string;
/**
 * @param {WorktreeRowStatus} status
 * @returns {string}
 */
export function renderWorktreeStatusBadge(status: WorktreeRowStatus): string;
/**
 * @returns {string}
 */
export function renderWorktreeEmptyState(): string;
/**
 * Flattens the view model status counts into a single record consumed by the
 * animation layer (count-up + change-flash). The presenter is the single source
 * of truth for these counts — this helper just renames the keys.
 *
 * @param {WorktreePanelViewModel} viewModel
 * @returns {WorktreeTotals}
 */
export function snapshotTotals(viewModel: WorktreePanelViewModel): WorktreeTotals;
/**
 * Returns the metric keys whose value changed between two snapshots. A key
 * whose previous value is null (cold start) is ignored — only transitions
 * between known values are surfaced.
 *
 * @param {NullableWorktreeTotals} previous
 * @param {WorktreeTotals} next
 * @returns {Array<'total' | 'active' | 'idle' | 'stale'>}
 */
export function computeChangedMetricKeys(previous: NullableWorktreeTotals, next: WorktreeTotals): Array<"total" | "active" | "idle" | "stale">;
/**
 * @param {DegradedRowViewModel[]} degraded
 * @returns {string}
 */
export function renderDegradedAlerts(degraded: DegradedRowViewModel[]): string;
/**
 * @param {WorktreePanelViewModel} viewModel
 * @returns {string}
 */
export function renderWorktreeSection(viewModel: WorktreePanelViewModel): string;
/**
 * @param {typeof fetch} [fetchImpl]
 * @returns {Promise<WorktreePanelViewModel>}
 */
export function fetchWorktreeOverview(fetchImpl?: typeof fetch): Promise<WorktreePanelViewModel>;
/**
 * @param {typeof fetch} [fetchImpl]
 * @returns {Promise<ManualSweepResult>}
 */
export function triggerManualSweep(fetchImpl?: typeof fetch): Promise<ManualSweepResult>;
/**
 * @param {CleanupEndpointPayload} payload
 * @param {typeof fetch} [fetchImpl]
 * @returns {Promise<ForceCleanupResult>}
 */
export function triggerForceCleanup(payload: CleanupEndpointPayload, fetchImpl?: typeof fetch): Promise<ForceCleanupResult>;
export type WorktreeRowStatus = "active" | "idle" | "stale";
export type WorktreeRowViewModel = {
    mrNumber: number;
    path: string;
    mtime: string;
    ageSeconds: number;
    sizeBytes: number | null;
    status: WorktreeRowStatus;
};
export type WorktreeGroupViewModel = {
    platform: "gitlab" | "github";
    projectPath: string;
    worktrees: WorktreeRowViewModel[];
};
export type LastSweepViewModel = {
    ranAt: string;
    removed: number;
    failures: number;
    scanned: number;
};
export type DegradedReasonCode = "stale" | "orphan-git-lock" | "unresolved-conflict";
export type CleanupEndpointPayload = {
    platform: "gitlab" | "github";
    projectPath: string;
    mrNumber: number;
};
export type DegradedRowViewModel = {
    mrNumber: number;
    platform: "gitlab" | "github";
    projectPath: string;
    path: string;
    reasonCode: DegradedReasonCode;
    reasonLabel: string;
    detectedAtIso: string;
    recommendedAction: string;
    cleanupEndpointPayload: CleanupEndpointPayload;
};
export type WorktreePanelViewModel = {
    totalCount: number;
    totalSizeBytes: number;
    activeCount: number;
    idleCount: number;
    staleCount: number;
    nextSweepAt: string;
    lastSweep: LastSweepViewModel | null;
    groups: WorktreeGroupViewModel[];
    degradedCount: number;
    degraded: DegradedRowViewModel[];
};
export type ForceCleanupResult = {
    status: "ok";
} | {
    status: "conflict";
} | {
    status: "not-found";
} | {
    status: "error";
    reason?: string;
};
export type WorktreeTotals = {
    total: number;
    active: number;
    idle: number;
    stale: number;
};
export type NullableWorktreeTotals = {
    total: number | null;
    active: number | null;
    idle: number | null;
    stale: number | null;
};
export type ManualSweepResult = {
    status: "ok";
    payload: {
        ranAt: string;
        removed: number;
        failures: number;
        scanned: number;
    };
} | {
    status: "conflict";
    startedAt: string;
} | {
    status: "error";
    reason?: string;
};
//# sourceMappingURL=worktreePanel.d.ts.map