import { OnInit, OnDestroy, ChangeDetectorRef, ViewContainerRef } from '@angular/core';
import { ViewToggleOption, MJLeftNavItem, MJLeftNavSection, FilterFieldConfig } from '@memberjunction/ng-ui-components';
import { MJTestSuiteEntity, MJTestTypeEntity } from '@memberjunction/core-entities';
import { TestingDialogService } from '@memberjunction/ng-testing';
import { TestingInstrumentationService } from '../services/testing-instrumentation.service';
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
import * as i0 from "@angular/core";
interface SuiteCardData {
    ID: string;
    Name: string;
    Description: string;
    Status: string;
    TestCount: number;
    PassRate: number;
    AvgScore: number;
    AvgDuration: number;
    LastRunDate: Date | null;
    Tags: string[];
    Tests: SuiteTestItem[];
    TotalTestsInSuite: number;
}
interface SuiteTestItem {
    TestID: string;
    TestName: string;
    LastStatus: string;
    LastScore: number;
}
interface TestCardData {
    ID: string;
    Name: string;
    Description: string;
    Status: string;
    TypeName: string;
    SuiteName: string;
    LastRunStatus: string;
    LastScore: number;
    TotalRuns: number;
    PassRate: number;
    EstDuration: number;
    EstCost: number;
    LastRunDate: Date | null;
    Tags: string[];
    UpdatedAt: Date;
}
interface SidebarSelection {
    Type: 'all' | 'standalone' | 'suite' | 'testType';
    ID: string | null;
}
interface SuiteTreeNode {
    ID: string;
    Name: string;
    ParentID: string | null;
    TestCount: number;
    Children: SuiteTreeNode[];
    Expanded: boolean;
}
type DisplayMode = 'all' | 'suites' | 'tests';
type ViewMode = 'card' | 'list';
type SortField = 'name' | 'updated' | 'status';
type SortDirection = 'asc' | 'desc';
export declare class TestingExplorerComponent extends BaseAngularComponent implements OnInit, OnDestroy {
    private cdr;
    private viewContainerRef;
    testingDialogService: TestingDialogService;
    instrumentationService: TestingInstrumentationService;
    readonly HeaderViewOptions: ViewToggleOption[];
    readonly DisplayModeOptions: ViewToggleOption[];
    /** mj-page-search emits a string; bridge it to the inner's Event-based OnSearchInput. */
    OnSearchInputValue(value: string): void;
    /** When true, the inner bespoke .toolbar is hidden — the parent shell owns the chrome. */
    HideToolbar: boolean;
    private destroy$;
    private allTests;
    AllSuites: MJTestSuiteEntity[];
    private allSuiteTests;
    AllTestTypes: MJTestTypeEntity[];
    private testRunStats;
    private suiteCards;
    private testCards;
    private _searchTerm$;
    private _statusFilters$;
    private _viewMode$;
    private _displayMode$;
    private _selectedSidebar$;
    private _sortField$;
    private _sortDirection$;
    IsLoading: boolean;
    SearchTerm: string;
    StatusFilters: Set<string>;
    ViewMode: ViewMode;
    DisplayMode: DisplayMode;
    SelectedSidebar: SidebarSelection;
    SortField: SortField;
    SortDirection: SortDirection;
    FilteredSuites: SuiteCardData[];
    FilteredTests: TestCardData[];
    FilteredSuiteTree: SuiteTreeNode[];
    FilteredTestTypes: MJTestTypeEntity[];
    TotalItemCount: number;
    StandaloneTestCount: number;
    FilteredResultCount: number;
    readonly StatusOptions: string[];
    readonly FormStatusOptions: string[];
    private static readonly PANEL_WIDTH_KEY;
    private static readonly SEARCH_STATE_KEY;
    private settingsPersistSubject;
    private settingsLoaded;
    SlideoutOpen: boolean;
    SlideoutCreateType: 'test' | 'suite';
    SlideoutWidth: number;
    IsSaving: boolean;
    FormErrorMessage: string;
    private resizeStartX;
    private resizeStartWidth;
    FormName: string;
    FormDescription: string;
    FormTypeID: string;
    FormStatus: 'Active' | 'Pending' | 'Disabled';
    FormParentSuiteID: string;
    FormEstDuration: number;
    FormEstCost: number;
    FormTags: string;
    get IsFormValid(): boolean;
    constructor(cdr: ChangeDetectorRef, viewContainerRef: ViewContainerRef, testingDialogService: TestingDialogService, instrumentationService: TestingInstrumentationService);
    ngOnInit(): Promise<void>;
    ngOnDestroy(): void;
    LoadData(): Promise<void>;
    IsSidebarSelected(id: string): boolean;
    SelectSidebarItem(selection: SidebarSelection): void;
    ToggleStatus(status: string): void;
    IsStatusActive(status: string): boolean;
    SetDisplayMode(mode: DisplayMode): void;
    SetViewMode(mode: ViewMode): void;
    OnSearchInput(event: Event): void;
    ClearSearch(): void;
    ToggleSuiteExpand(node: SuiteTreeNode): void;
    /** Composite-key sections fed to <mj-left-nav>. */
    get NavSections(): MJLeftNavSection[];
    /** Recursive map SuiteTreeNode -> MJLeftNavItem. Leaves keep `children: []`
     *  so the primitive renders a placeholder where the chevron would be —
     *  this keeps siblings vertically aligned. */
    private suiteNodeToNavItem;
    /** Translate SelectedSidebar (typed Type+ID) to the rail's composite key. */
    get ActiveNavId(): string;
    /** Suite-node IDs that are currently expanded, walked from FilteredSuiteTree. */
    get ExpandedNavIds(): string[];
    /** Parse composite id and delegate to the existing SelectSidebarItem path. */
    OnNavItemClicked(item: MJLeftNavItem): void;
    /** Chevron click on a suite item — toggle that node's Expanded flag. */
    OnNavItemToggled(item: MJLeftNavItem): void;
    private findSuiteNode;
    readonly sortFieldOptions: {
        text: string;
        value: string;
    }[];
    readonly sortDirectionOptions: {
        text: string;
        value: string;
    }[];
    /**
     * Concise-chrome model: every filter (View · Status · Sort) lives behind a
     * single "Filter" button via this one mj-filter-panel field set. The applied
     * state is surfaced separately as removable chips (see AppliedFilters), so
     * input (the button) and state (the chips) are cleanly separated.
     */
    get filterFields(): FilterFieldConfig[];
    get filterValues(): Record<string, unknown>;
    onFilterValuesChange(values: Record<string, unknown>): void;
    resetSortFilters(): void;
    /** Clears every filter (View · Status · Sort) back to defaults. */
    resetAllFilters(): void;
    /** Active sort changes from defaults — contributes to the filter badge + chips. */
    get ActiveSortFilterCount(): number;
    /** Total active filters (View + Status + Sort) — drives the Filter button badge. */
    get TotalActiveFilterCount(): number;
    RunTest(testId: string): void;
    RunSuite(suiteId: string): void;
    OnPanelClosed(): void;
    EditItem(entityName: string, id: string): void;
    ViewTestHistory(testId: string): void;
    ViewSuiteResults(suiteId: string): void;
    OnNewTest(): void;
    OnNewSuite(): void;
    OpenSlideout(type: 'test' | 'suite'): void;
    CloseSlideout(): void;
    SetSlideoutCreateType(type: 'test' | 'suite'): void;
    SaveForm(): Promise<void>;
    OnResizeStart(event: MouseEvent): void;
    private onResizeMove;
    private onResizeEnd;
    GetTestCountForType(typeId: string): number;
    FormatDuration(ms: number): string;
    FormatDurationSeconds(seconds: number): string;
    FormatRelativeTime(date: Date | null): string;
    FormatPercent(value: number): string;
    FormatCost(cost: number): string;
    GetScoreClass(score: number): string;
    GetStatusClass(status: string): string;
    private loadCachedMetadata;
    private loadTestRunStats;
    private buildSuiteCards;
    private buildSingleSuiteCard;
    private buildSuiteTestPreviews;
    private buildTestCards;
    private buildSingleTestCard;
    private buildSuiteTree;
    private filterTestTypes;
    private subscribeToStateChanges;
    private applyFilters;
    private filterSuiteCards;
    private filterTestCards;
    private applySidebarFilterToSuites;
    private applySidebarFilterToTests;
    private applySearchFilterToSuites;
    private applySearchFilterToTests;
    private applyStatusFilterToSuites;
    private applyStatusFilterToTests;
    private sortSuiteCards;
    private sortTestCards;
    private compareBySortField;
    private computeCounts;
    private computeAvgDuration;
    private findLastRunDate;
    private findLastRunForTest;
    private findSuiteNameForTest;
    private parseTags;
    private toDate;
    private loadUserSettings;
    private setupSettingsPersistence;
    private persistSearchState;
    private resetForm;
    private saveNewTest;
    private saveNewSuite;
    static ɵfac: i0.ɵɵFactoryDeclaration<TestingExplorerComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TestingExplorerComponent, "app-testing-explorer", never, { "HideToolbar": { "alias": "HideToolbar"; "required": false; }; }, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=testing-explorer.component.d.ts.map