import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { WindowRef } from '@progress/kendo-angular-dialog';
import { Subject, BehaviorSubject } from 'rxjs';
import { AIPromptEntityExtended, TemplateEntity, AIPromptTypeEntity, TemplateContentEntity } from '@memberjunction/core-entities';
import { TemplateEditorConfig } from '../../shared/components/template-editor.component';
import { AIPromptManagementService } from '../AIPrompts/ai-prompt-management.service';
import * as i0 from "@angular/core";
export interface CreatePromptConfig {
    /** Title for the dialog */
    title?: string;
    /** Initial name for the prompt */
    initialName?: string;
    /** Pre-selected prompt type ID */
    initialTypeID?: string;
}
export interface CreatePromptResult {
    /** Created prompt entity (not saved to database) */
    prompt: AIPromptEntityExtended;
    /** Created template entity (not saved to database) */
    template?: TemplateEntity;
    /** Template content entities (not saved to database) */
    templateContents?: TemplateContentEntity[];
}
/**
 * Dialog for creating new AI Prompts with essential fields and basic template editing.
 * 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 CreatePromptDialogComponent implements OnInit, OnDestroy {
    private dialogRef;
    private cdr;
    private aiPromptManagementService;
    config: CreatePromptConfig;
    private destroy$;
    result: Subject<CreatePromptResult | null>;
    promptForm: FormGroup;
    isLoading$: BehaviorSubject<boolean>;
    isSaving$: BehaviorSubject<boolean>;
    availablePromptTypes$: BehaviorSubject<AIPromptTypeEntity[]>;
    promptEntity: AIPromptEntityExtended | null;
    templateEntity: TemplateEntity | null;
    templateContents: TemplateContentEntity[];
    templateEditor: any;
    showTemplateEditor: boolean;
    templateEditorConfig: TemplateEditorConfig;
    templateMode: 'new' | 'existing';
    constructor(dialogRef: WindowRef, cdr: ChangeDetectorRef, aiPromptManagementService: AIPromptManagementService);
    ngOnInit(): void;
    ngOnDestroy(): void;
    private createForm;
    private setupFormWatching;
    private loadInitialData;
    handleTemplateModeChange(mode: string): Promise<void>;
    private createNewTemplate;
    onTemplateContentChange(contents: TemplateContentEntity[]): void;
    save(): Promise<void>;
    cancel(): void;
    /**
     * Opens the template selector dialog to link an existing template
     */
    private openTemplateSelector;
    get currentTemplate(): TemplateEntity | null;
    static ɵfac: i0.ɵɵFactoryDeclaration<CreatePromptDialogComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<CreatePromptDialogComponent, "mj-create-prompt-dialog", never, {}, {}, never, never, false, never>;
}
//# sourceMappingURL=create-prompt-dialog.component.d.ts.map