import { OnInit } from '@angular/core';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { FilterFieldConfig } from '@memberjunction/ng-ui-components';
import { ResourceData } from '@memberjunction/core-entities';
import { IntegrationRunRow, RunDetailRow } from '../../services/integration-data.service';
import * as i0 from "@angular/core";
type StatusFilterType = 'All' | 'Success' | 'Failed' | 'In Progress' | 'Pending';
type DateFilterType = 'today' | '7d' | '30d' | 'all';
interface WatermarkRow {
    ID: string;
    EntityMapID: string;
    WatermarkType: string;
    WatermarkValue: string | null;
    LastSyncAt: string | null;
    EntityMap: string;
}
interface IntegrationOption {
    ID: string;
    Name: string;
}
export declare class ActivityComponent extends BaseResourceComponent implements OnInit {
    AllRuns: IntegrationRunRow[];
    FilteredRuns: IntegrationRunRow[];
    Integrations: IntegrationOption[];
    SelectedRunID: string | null;
    SelectedRunDetails: RunDetailRow[];
    WatermarkData: WatermarkRow[];
    IsLoading: boolean;
    IsLoadingDetail: boolean;
    StatusFilter: StatusFilterType;
    IntegrationFilter: string | null;
    DateFilter: DateFilterType;
    SearchQuery: string;
    ExpandedRunID: string | null;
    private expandedDetails;
    private isLoadingExpanded;
    ActiveDetailTab: 'entities' | 'watermarks';
    IsLoadingWatermarks: boolean;
    StatusOptions: StatusFilterType[];
    DateOptions: {
        Value: DateFilterType;
        Label: string;
    }[];
    private dataService;
    private cdr;
    ngOnInit(): Promise<void>;
    LoadData(): Promise<void>;
    private loadAllRuns;
    private buildIntegrationOptions;
    LoadRunDetails(runID: string): Promise<RunDetailRow[]>;
    LoadWatermarks(companyIntegrationID: string): Promise<void>;
    private loadWatermarkData;
    private mergeWatermarksWithEntityMaps;
    ApplyFilters(): void;
    private filterByStatus;
    private filterByIntegration;
    private filterByDate;
    private filterBySearch;
    private getDateCutoff;
    SetStatusFilter(status: StatusFilterType): void;
    SetDateFilter(range: DateFilterType): void;
    SetIntegrationFilter(id: string | null): void;
    OnSearchChange(): void;
    /** Bridge for <mj-page-search> which emits a plain string. */
    OnSearchValueChange(value: string): void;
    get ActivityFilterFields(): FilterFieldConfig[];
    get ActivityFilterValues(): Record<string, unknown>;
    get ActiveFilterCount(): number;
    OnFilterValuesChange(values: Record<string, unknown>): void;
    ResetIntegrationFilter(): void;
    Refresh(): Promise<void>;
    SelectRun(runID: string): Promise<void>;
    ToggleExpand(runID: string): Promise<void>;
    IsExpanded(runID: string): boolean;
    IsSelectedRun(runID: string): boolean;
    GetExpandedDetails(): RunDetailRow[];
    IsLoadingExpandedDetails(): boolean;
    GetSelectedRun(): IntegrationRunRow | null;
    SetDetailTab(tab: 'entities' | 'watermarks'): void;
    private findRunByID;
    FormatDuration(startedAt: string | null, endedAt: string | null): string;
    GetRelativeTime(dateStr: string | null): string;
    FormatAbsoluteDate(dateStr: string | null): string;
    FormatWatermark(value: string | null): string;
    FormatDate(dateStr: string | null): string;
    GetStatusIcon(status: string): string;
    GetStatusColor(status: string): string;
    GetStatusDotClass(status: string): string;
    StatusChipClass(status: string): string;
    GetErrorCount(run: IntegrationRunRow): number;
    get TotalRuns(): number;
    get SuccessfulRuns(): number;
    get FailedRuns(): number;
    get TotalRecordsProcessed(): number;
    GetDurationBarWidth(run: IntegrationRunRow): number;
    GetDurationBarLabel(run: IntegrationRunRow): string;
    GetResourceDisplayName(_data: ResourceData): Promise<string>;
    GetResourceIconClass(_data: ResourceData): Promise<string>;
    static ɵfac: i0.ɵɵFactoryDeclaration<ActivityComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ActivityComponent, "app-integration-activity", never, {}, {}, never, never, false, never>;
}
export declare function LoadActivityComponent(): void;
export {};
//# sourceMappingURL=activity.component.d.ts.map