import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { Subject } from 'rxjs';
import { MJActionCategoryEntity, MJActionEntity, MJActionParamEntity, ResourceData } from '@memberjunction/core-entities';
import { MJActionEntityExtended } from '@memberjunction/actions-base';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { ViewToggleOption } from '@memberjunction/ng-ui-components';
import { ActionExplorerStateService, ActionViewMode, SortField, SortDirection, ActionFilters } from '../../services/action-explorer-state.service';
import { ActionTreePanelComponent } from './action-tree-panel.component';
import * as i0 from "@angular/core";
interface SortOption {
    field: SortField;
    label: string;
    icon: string;
}
export declare class ActionExplorerComponent extends BaseResourceComponent implements OnInit, OnDestroy {
    StateService: ActionExplorerStateService;
    private cdr;
    TreePanel: ActionTreePanelComponent;
    IsLoading: boolean;
    Actions: MJActionEntityExtended[];
    FilteredActions: MJActionEntityExtended[];
    Categories: MJActionCategoryEntity[];
    CategoriesMap: Map<string, MJActionCategoryEntity>;
    ViewMode: ActionViewMode;
    SortField: SortField;
    SortDirection: SortDirection;
    Filters: ActionFilters;
    SelectedCategoryId: string;
    NewCategoryParentId: string | null;
    IsRunDialogOpen: boolean;
    SelectedActionForRun: MJActionEntity | null;
    SelectedActionParams: MJActionParamEntity[];
    readonly ViewToggleOptions: ViewToggleOption[];
    readonly SortOptions: SortOption[];
    readonly StatusOptions: {
        value: string;
        label: string;
    }[];
    readonly TypeOptions: {
        value: string;
        label: string;
        icon: string;
    }[];
    /** Allowed view modes (mirrors `ViewToggleOptions` / `ActionViewMode`). */
    private readonly viewModeValues;
    /** Allowed sort fields (mirrors `SortOptions` / `SortField`). */
    private readonly sortFieldValues;
    /** Allowed sort directions. */
    private readonly sortDirectionValues;
    /** Allowed action statuses (mirrors `StatusOptions`). */
    private readonly statusValues;
    /** Allowed action types (mirrors `TypeOptions`). */
    private readonly typeValues;
    protected destroy$: Subject<void>;
    private searchInput$;
    constructor(StateService: ActionExplorerStateService, cdr: ChangeDetectorRef);
    ngOnInit(): void;
    private setupSearchDebounce;
    ngOnDestroy(): void;
    private subscribeToState;
    /** Publish the current explorer state to the agent. Called on load and on every
     *  view/filter/sort/category change. Deep context: view mode, sort, the selected
     *  category (id + NAME), total/filtered counts, all filter state, and the bounded
     *  list of currently-visible action names so the agent can pick one by name. */
    private publishAgentContext;
    /** Human label for the current category selection (resolves id → name; handles the special selections). */
    private getSelectedCategoryLabel;
    /** Register the read-only / navigational client tools the agent can invoke on this surface. */
    private registerAgentTools;
    /**
     * Convert the framework's plain-object params into the StateService's URLSearchParams-based parser.
     */
    private applyQueryParams;
    private loadData;
    private applyFilters;
    private getDescendantCategoryIds;
    private sortActions;
    /**
     * React to back/forward navigation or deep-link activation.
     * Called by the base class when the URL query params change externally.
     */
    protected OnQueryParamsChanged(params: Record<string, string>, source: 'popstate' | 'deeplink'): void;
    onRefresh(): Promise<void>;
    onCategorySelect(categoryId: string): void;
    onNewCategory(parentId: string | null): void;
    onEditCategory(category: MJActionCategoryEntity): void;
    onNewAction(): void;
    /** True when search/filters or a category selection narrow the list. */
    get IsListNarrowed(): boolean;
    /** Empty-state CTA: reset filters when narrowed, otherwise create. */
    onEmptyStateAction(): void;
    onActionClick(action: MJActionEntityExtended): void;
    onActionEdit(action: MJActionEntityExtended): void;
    onActionRun(action: MJActionEntityExtended): Promise<void>;
    OnRunDialogClose(): void;
    onCategoryClick(categoryId: string): void;
    onCategoryCreated(category: MJActionCategoryEntity): Promise<void>;
    onActionCreated(): Promise<void>;
    onSearchInput(term: string): void;
    clearSearch(): void;
    setViewMode(mode: ActionViewMode): void;
    setSortField(field: SortField): void;
    toggleStatus(status: string): void;
    toggleType(type: string): void;
    isStatusSelected(status: string): boolean;
    isTypeSelected(type: string): boolean;
    clearFilters(): void;
    /** Active filter count for the popover badge — counts only Status + Type
     *  (searchTerm has its own search input, not part of the popover). */
    get StatusTypeFilterCount(): number;
    GetResourceDisplayName(data: ResourceData): Promise<string>;
    GetResourceIconClass(data: ResourceData): Promise<string>;
    static ɵfac: i0.ɵɵFactoryDeclaration<ActionExplorerComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ActionExplorerComponent, "mj-action-explorer", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=action-explorer.component.d.ts.map