import { OnInit, OnDestroy, AfterViewInit, ChangeDetectorRef } from '@angular/core';
import { Subject } from 'rxjs';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { ResourceData, MJVersionLabelRestoreEntityType } from '@memberjunction/core-entities';
import { FilterFieldConfig } from '@memberjunction/ng-ui-components';
import * as i0 from "@angular/core";
export declare class VersionHistoryRestoreResourceComponent extends BaseResourceComponent implements OnInit, OnDestroy, AfterViewInit {
    private cdr;
    IsLoading: boolean;
    TotalRestores: number;
    SuccessfulRestores: number;
    FailedRestores: number;
    PartialRestores: number;
    Restores: MJVersionLabelRestoreEntityType[];
    FilteredRestores: MJVersionLabelRestoreEntityType[];
    StatusFilter: string;
    ExpandedRestoreId: string;
    private static readonly PREFS_KEY;
    private preferencesLoaded;
    protected destroy$: Subject<void>;
    constructor(cdr: ChangeDetectorRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    /**
     * After the view initializes, publish the initial agent context and register
     * the client tools the AI agent can invoke against this surface. The ongoing
     * context re-emit happens in {@link applyFilters} / {@link LoadData}.
     */
    ngAfterViewInit(): void;
    /**
     * Publish the current Restore-surface state to the AI agent via NavigationService.
     * Shaping lives in the pure {@link buildVersionHistoryRestoreAgentContext} helper
     * so it stays unit-testable. Called on load and on every filter change.
     */
    private publishAgentContext;
    /** The loaded restores narrowed to the resolver's {@link RestoreSnapshot} shape. */
    private restoreSnapshots;
    /**
     * Register the read-only client tools the AI agent can invoke against the
     * Restore surface. Each handler is tolerant — it never throws and returns a
     * typed `{ Success, Data?, ErrorMessage? }` result.
     *
     * Tools:
     * - FilterRestoresByStatus: filter the history by a restore status.
     * - RefreshRestoreHistory: reload the restore history from the server.
     * - GetRestoreStats: return the current restore-status counts.
     * - SelectRestore: expand a restore's detail row (by ID or name) for viewing.
     */
    private registerAgentClientTools;
    /**
     * Expand a restore's detail row by ID or name (view-only). Resolves via the
     * pure {@link resolveRestore} helper (exact ID → exact name → name-contains).
     * Never throws.
     */
    private toolSelectRestore;
    /**
     * Apply a status filter for the restore history. Validates the requested
     * status and sets it deterministically (does NOT use the toggle semantics of
     * {@link OnStatusFilterChange}, so the agent always lands on the requested
     * filter regardless of the current state).
     */
    private toolFilterRestoresByStatus;
    GetResourceDisplayName(data: ResourceData): Promise<string>;
    GetResourceIconClass(data: ResourceData): Promise<string>;
    LoadData(): Promise<void>;
    private computeStats;
    applyFilters(): void;
    OnStatusFilterChange(status: string): void;
    get statusFilterFields(): FilterFieldConfig[];
    get statusFilterValues(): Record<string, unknown>;
    get ActiveFilterCount(): number;
    onFilterValuesChange(values: Record<string, unknown>): void;
    resetStatusFilter(): void;
    private loadUserPreferences;
    private persistPreferences;
    ToggleExpand(restoreId: string | undefined): void;
    IsExpanded(restoreId: string | undefined): boolean;
    GetStatusClass(status: string | undefined): string;
    GetStatusIcon(status: string | undefined): string;
    GetProgressPercent(restore: MJVersionLabelRestoreEntityType): number;
    FormatDate(date: Date | string | undefined): string;
    Refresh(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<VersionHistoryRestoreResourceComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<VersionHistoryRestoreResourceComponent, "mj-version-history-restore-resource", never, {}, {}, never, never, false, never>;
}
//# sourceMappingURL=restore-resource.component.d.ts.map