import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { MJAIPromptTypeEntity, MJAIPromptCategoryEntity, MJTemplateEntity, MJTemplateContentEntity, ResourceData } from '@memberjunction/core-entities';
import { SharedService, BaseResourceComponent, NavigationService } from '@memberjunction/ng-shared';
import { AITestHarnessDialogService } from '@memberjunction/ng-ai-test-harness';
import { MJAIPromptEntityExtended } from '@memberjunction/ai-core-plus';
import * as i0 from "@angular/core";
interface PromptWithTemplate extends Omit<MJAIPromptEntityExtended, 'Template'> {
    Template: string;
    MJTemplateEntity?: MJTemplateEntity;
    TemplateContents?: MJTemplateContentEntity[];
    CategoryName?: string;
    TypeName?: string;
}
/**
 * AI Prompts Resource - displays AI prompt management
 * Extends BaseResourceComponent to work with the resource type system
 */
export declare class PromptManagementComponent extends BaseResourceComponent implements OnInit, OnDestroy {
    private sharedService;
    private testHarnessService;
    private navigationService;
    private cdr;
    private readonly USER_SETTINGS_KEY;
    private settingsPersistSubject;
    private settingsLoaded;
    viewMode: 'grid' | 'list' | 'priority-matrix';
    isLoading: boolean;
    showFilters: boolean;
    expandedPromptId: string | null;
    prompts: PromptWithTemplate[];
    filteredPrompts: PromptWithTemplate[];
    categories: MJAIPromptCategoryEntity[];
    types: MJAIPromptTypeEntity[];
    searchTerm: string;
    private searchSubject;
    selectedCategory: string;
    selectedType: string;
    selectedStatus: string;
    selectedPrompt: PromptWithTemplate | null;
    detailPanelVisible: boolean;
    sortColumn: string;
    sortDirection: 'asc' | 'desc';
    loadingMessages: string[];
    currentLoadingMessage: string;
    private loadingMessageIndex;
    private loadingMessageInterval;
    private destroy$;
    selectedPromptForTest: MJAIPromptEntityExtended | null;
    /** Cache for permission checks to avoid repeated calculations */
    private _permissionCache;
    private _metadata;
    /** Check if user can create AI Prompts */
    get UserCanCreatePrompts(): boolean;
    /** Check if user can read AI Prompts */
    get UserCanReadPrompts(): boolean;
    /** Check if user can update AI Prompts */
    get UserCanUpdatePrompts(): boolean;
    /** Check if user can delete AI Prompts */
    get UserCanDeletePrompts(): boolean;
    /**
     * Helper method to check entity permissions with caching
     * @param entityName - The name of the entity to check permissions for
     * @param permissionType - The type of permission to check (Create, Read, Update, Delete)
     * @returns boolean indicating if user has the permission
     */
    private checkEntityPermission;
    /**
     * Clears the permission cache. Call this when user context changes or permissions are updated.
     */
    clearPermissionCache(): void;
    constructor(sharedService: SharedService, testHarnessService: AITestHarnessDialogService, navigationService: NavigationService, cdr: ChangeDetectorRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    private setupSearchListener;
    /**
     * Load saved user preferences from the UserInfoEngine
     */
    private loadUserPreferences;
    /**
     * Apply loaded preferences to component state
     */
    private applyUserPreferencesFromStorage;
    /**
     * Get current preferences as an object for saving
     */
    private getCurrentPreferences;
    /**
     * Persist user preferences to storage (debounced)
     */
    private saveUserPreferencesDebounced;
    /**
     * Actually persist user preferences to the UserInfoEngine
     */
    private persistUserPreferences;
    private startLoadingMessages;
    private loadInitialData;
    private applyInitialState;
    onSearchChange(value: string): void;
    toggleFilters(): void;
    toggleFilterPanel(): void;
    setViewMode(mode: 'grid' | 'list' | 'priority-matrix'): void;
    togglePromptExpansion(promptId: string): void;
    applyFilters(): void;
    /**
     * Sort the prompts by the specified column
     */
    sortBy(column: string): void;
    /**
     * Apply sorting to the filtered list
     */
    private applySorting;
    onCategoryChange(categoryId: string): void;
    onTypeChange(typeId: string): void;
    onStatusChange(status: string): void;
    openPrompt(promptId: string): void;
    /**
     * Show the detail panel for a prompt
     */
    showPromptDetails(prompt: PromptWithTemplate, event?: Event): void;
    /**
     * Close the detail panel
     */
    closeDetailPanel(): void;
    /**
     * Open the full entity record from the detail panel
     */
    openPromptFromPanel(): void;
    testPrompt(promptId: string, event?: Event): void;
    closeTestHarness(): void;
    createNewPrompt(): void;
    getPromptIcon(prompt: PromptWithTemplate): string;
    getStatusClass(status: string): string;
    get hasActiveFilters(): boolean;
    get filteredPromptsAsEntities(): MJAIPromptEntityExtended[];
    clearFilters(): void;
    GetResourceDisplayName(data: ResourceData): Promise<string>;
    GetResourceIconClass(data: ResourceData): Promise<string>;
    static ɵfac: i0.ɵɵFactoryDeclaration<PromptManagementComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<PromptManagementComponent, "app-prompt-management", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=prompt-management.component.d.ts.map