import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
import { BaseResourceComponent, NavigationService } from '@memberjunction/ng-shared';
import { ResourceData } from '@memberjunction/core-entities';
import * as i0 from "@angular/core";
/**
 * "Run History" sub-page of the Bulk Operations shell. A thin host that renders the generic, self-contained
 * `<mj-record-process-history>` (run list + per-record drill-in) scoped to the current provider.
 *
 * Like its Operations sibling, this host wires the surface into the MJ AI-agent stack: it reports the
 * history component's live state via `SetAgentContext` and registers SAFE, READ-ONLY navigation tools via
 * `SetAgentClientTools`. The host reaches the hosted generic component through a {@link ViewChild}
 * reference (`history`) and only reads its public state / calls its public methods.
 *
 * 🚨🚨🚨 SAFETY BOUNDARY — Run History is a read-only audit surface. 🚨🚨🚨
 * Every tool exposed here is read-only / navigational (refresh, view a run's details, go back). There is
 * NOTHING destructive on this surface and there must NEVER be:
 *   - DO NOT add any tool that re-runs, applies, retries, or otherwise mutates a Record Process or its
 *     records. Re-running an operation belongs on the Operations surface and is gated by the runner's
 *     dry-run → user-confirm flow there.
 *   - DO NOT expose any tool that writes to the run / run-detail tables.
 * Viewing history is inert; keep it that way.
 */
export declare class BulkOperationsRunHistoryComponent extends BaseResourceComponent implements OnInit, AfterViewInit, OnDestroy {
    /** Reference to the hosted generic history component — the source of truth for context + tool target. */
    private history?;
    protected navigationService: NavigationService;
    ngOnInit(): Promise<void>;
    /**
     * Wire agent context + tools once the view (and the `history` ViewChild) is available. The history
     * component finishes its initial `reload()` asynchronously; we publish immediately and rely on each
     * tool Handler to re-publish after acting. A `queueMicrotask` defers the first publish one tick so an
     * already-resolved `ngOnInit` reload is reflected.
     */
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    GetResourceDisplayName(_data: ResourceData): Promise<string>;
    GetResourceIconClass(_data: ResourceData): Promise<string>;
    /**
     * Publish the history component's live state to the AI agent. Tolerant of the ViewChild not yet being
     * resolved. Re-invoked by every tool Handler after it changes history state, since the generic
     * component emits no change events we could subscribe to.
     */
    private publishAgentContext;
    /**
     * Register the SAFE, read-only agent tools for the Run History surface: refresh the run list, open a
     * run's per-record details, and return to the list. Every Handler is tolerant and re-publishes context.
     */
    private registerAgentTools;
    /** Reload the run list, then re-publish context. */
    private handleRefresh;
    /** Open a run's per-record details, resolved from the history component's loaded run list by id or operation name. */
    private handleViewDetails;
    /** Return to the run list from a detail view. */
    private handleBackToList;
    /** The hosted history component, or undefined if the view isn't ready yet. */
    private requireHistory;
    /** Typed "not ready" failure for tools invoked before the ViewChild resolves. */
    private notReady;
    /**
     * Resolve a run row from the history component's loaded list by ID OR operation name (delegates to
     * the pure, unit-tested {@link resolveRowByIDOrName} helper: exact run ID → exact operation name →
     * partial operation-name contains). Because runs are listed most-recent-first, a name match yields
     * the most recent run of that operation. Returns a structured failure (listing available operation
     * names) if the param is missing/non-string or no row matches.
     */
    private findRun;
    static ɵfac: i0.ɵɵFactoryDeclaration<BulkOperationsRunHistoryComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<BulkOperationsRunHistoryComponent, "mj-bulk-operations-run-history", never, {}, {}, never, never, false, never>;
}
//# sourceMappingURL=bulk-operations-run-history.component.d.ts.map