import { EventEmitter, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { Observable } from 'rxjs';
import { AIAgentRunEntity, AIAgentRunStepEntity, ActionExecutionLogEntity, AIPromptRunEntity } from '@memberjunction/core-entities';
import { AIAgentRunDataHelper } from './ai-agent-run-data.service';
import * as i0 from "@angular/core";
export interface TimelineItem {
    id: string;
    type: 'step' | 'subrun' | 'action' | 'prompt';
    title: string;
    subtitle: string;
    status: string;
    startTime: Date;
    endTime?: Date;
    duration?: string;
    icon: string;
    logoUrl?: string;
    color: string;
    data: any;
    children?: TimelineItem[];
    level: number;
    parentId?: string;
    isExpanded?: boolean;
    childrenLoaded?: boolean;
    hasNoChildren?: boolean;
}
export declare class AIAgentRunTimelineComponent implements OnInit, OnDestroy {
    private cdr;
    aiAgentRunId: string;
    autoRefresh: boolean;
    refreshInterval: number;
    dataHelper: AIAgentRunDataHelper;
    itemSelected: EventEmitter<TimelineItem>;
    navigateToEntity: EventEmitter<{
        entityName: string;
        recordId: string;
    }>;
    agentRunCompleted: EventEmitter<string>;
    private destroy$;
    steps$: Observable<AIAgentRunStepEntity[]>;
    subRuns$: Observable<AIAgentRunEntity[]>;
    actionLogs$: Observable<ActionExecutionLogEntity[]>;
    promptRuns$: Observable<AIPromptRunEntity[]>;
    timelineItems$: Observable<TimelineItem[]>;
    loading: boolean;
    error: string | null;
    selectedItem: TimelineItem | null;
    private refreshTimer;
    private refreshSubscription;
    constructor(cdr: ChangeDetectorRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    private startAutoRefresh;
    private stopAutoRefresh;
    loadData(): Promise<void>;
    private buildTimelineItems;
    private buildHierarchicalItems;
    private createTimelineItemFromStep;
    private getStepIconInfo;
    private getStepIcon;
    private getStatusColor;
    calculateDuration(start: Date, end?: Date | null): string;
    selectItem(item: TimelineItem): void;
    toggleItemExpansion(item: TimelineItem, event: Event): Promise<void>;
    private loadSubAgentChildren;
    navigateToSubRun(runId: string, event: Event): void;
    navigateToActionLog(logId: string, event: Event): void;
    navigateToPromptRun(runId: string, event: Event): void;
    /**
     * TrackBy function for timeline items
     */
    trackByItemId(index: number, item: TimelineItem): string;
    createSubRunDataHelper(): AIAgentRunDataHelper;
    static ɵfac: i0.ɵɵFactoryDeclaration<AIAgentRunTimelineComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AIAgentRunTimelineComponent, "mj-ai-agent-run-timeline", never, { "aiAgentRunId": { "alias": "aiAgentRunId"; "required": false; }; "autoRefresh": { "alias": "autoRefresh"; "required": false; }; "refreshInterval": { "alias": "refreshInterval"; "required": false; }; "dataHelper": { "alias": "dataHelper"; "required": false; }; }, { "itemSelected": "itemSelected"; "navigateToEntity": "navigateToEntity"; "agentRunCompleted": "agentRunCompleted"; }, never, never, false, never>;
}
//# sourceMappingURL=ai-agent-run-timeline.component.d.ts.map