import { OnInit, OnDestroy, ChangeDetectorRef, ViewContainerRef, EventEmitter } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { Subject, BehaviorSubject } from 'rxjs';
import { MJAIAgentTypeEntity, MJAIAgentPromptEntity, MJAIAgentActionEntity, MJActionEntity } from '@memberjunction/core-entities';
import { AIAgentManagementService } from './ai-agent-management.service';
import { MJAIPromptEntityExtended, MJAIAgentEntityExtended } from "@memberjunction/ai-core-plus";
import * as i0 from "@angular/core";
export interface CreateSubAgentConfig {
    /** Title for the dialog */
    title?: string;
    /** Initial name for the sub-agent */
    initialName?: string;
    /** Pre-selected agent type ID */
    initialTypeID?: string;
    /** Parent agent ID for relationship */
    parentAgentId: string;
    /** Parent agent name for display */
    parentAgentName?: string;
}
export interface CreateSubAgentResult {
    /** Created sub-agent entity (not saved to database) */
    subAgent: MJAIAgentEntityExtended;
    /** Agent prompt link entities (not saved to database) */
    agentPrompts?: MJAIAgentPromptEntity[];
    /** Agent action link entities (not saved to database) */
    agentActions?: MJAIAgentActionEntity[];
    /** Any new prompts created within the dialog */
    newPrompts?: MJAIPromptEntityExtended[];
    /** Any new prompt templates created within the dialog */
    newPromptTemplates?: any[];
    /** Any new template contents created within the dialog */
    newTemplateContents?: any[];
}
/**
 * Dialog for creating new AI Sub-Agents with essential fields, actions, and prompts management.
 * Creates entities but does not save them - returns entities for parent to add to PendingRecords.
 * This ensures atomicity with the parent form's save operation.
 */
export declare class CreateSubAgentDialogComponent implements OnInit, OnDestroy {
    private cdr;
    private agentManagementService;
    private viewContainerRef;
    config: CreateSubAgentConfig;
    private destroy$;
    result: Subject<CreateSubAgentResult | null>;
    subAgentForm: FormGroup;
    isLoading$: BehaviorSubject<boolean>;
    isSaving$: BehaviorSubject<boolean>;
    availableAgentTypes$: BehaviorSubject<MJAIAgentTypeEntity[]>;
    availablePrompts$: BehaviorSubject<MJAIPromptEntityExtended[]>;
    availableActions$: BehaviorSubject<MJActionEntity[]>;
    subAgentEntity: MJAIAgentEntityExtended | null;
    linkedPrompts: MJAIPromptEntityExtended[];
    linkedActions: MJActionEntity[];
    agentPromptLinks: MJAIAgentPromptEntity[];
    agentActionLinks: MJAIAgentActionEntity[];
    newlyCreatedPrompts: MJAIPromptEntityExtended[];
    newlyCreatedPromptTemplates: any[];
    newlyCreatedTemplateContents: any[];
    DialogClose: EventEmitter<void>;
    constructor(cdr: ChangeDetectorRef, agentManagementService: AIAgentManagementService, viewContainerRef: ViewContainerRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    private createForm;
    private setupFormWatching;
    private loadInitialData;
    private updateSubAgentEntity;
    addPrompt(): Promise<void>;
    createNewPrompt(): Promise<void>;
    addAction(): Promise<void>;
    removePrompt(prompt: MJAIPromptEntityExtended): void;
    removeAction(action: MJActionEntity): void;
    save(): Promise<void>;
    cancel(): void;
    getAgentIcon(): string;
    getPromptIcon(): string;
    getActionIcon(): string;
    get linkedPromptCount(): number;
    get linkedActionCount(): number;
    static ɵfac: i0.ɵɵFactoryDeclaration<CreateSubAgentDialogComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<CreateSubAgentDialogComponent, "mj-create-sub-agent-dialog", never, {}, { "DialogClose": "DialogClose"; }, never, never, false, never>;
}
//# sourceMappingURL=create-sub-agent-dialog.component.d.ts.map