import { OnInit, OnDestroy, AfterViewInit } from '@angular/core';
import { TemplateEntity, TemplateContentEntity } from '@memberjunction/core-entities';
import { TemplateFormComponent } from '../../generated/Entities/Template/template.form.component';
import { LanguageDescription } from '@codemirror/language';
import { CodeEditorComponent } from '@memberjunction/ng-code-editor';
import { TemplateEditorConfig } from '../../shared/components/template-editor.component';
import * as i0 from "@angular/core";
export declare class TemplatesFormExtendedComponent extends TemplateFormComponent implements OnInit, OnDestroy, AfterViewInit {
    record: TemplateEntity;
    templateContents: TemplateContentEntity[];
    selectedContentIndex: number;
    isAddingNewContent: boolean;
    newTemplateContent: TemplateContentEntity | null;
    hasUnsavedChanges: boolean;
    templateInfoExpanded: boolean;
    templateContentsExpanded: boolean;
    categoryOptions: Array<{
        text: string;
        value: string;
    }>;
    contentTypeOptions: Array<{
        text: string;
        value: string;
    }>;
    supportedLanguages: LanguageDescription[];
    codeEditor: CodeEditorComponent | null;
    private isUpdatingEditorValue;
    isRunningTemplate: boolean;
    templateTestResult: string | null;
    templateTestError: string | null;
    showParamDialog: boolean;
    templateEditorConfig: TemplateEditorConfig;
    private destroy$;
    private activeTimeouts;
    ngOnInit(): Promise<void>;
    ngOnDestroy(): void;
    ngAfterViewInit(): void;
    loadTemplateContents(): Promise<void>;
    createDefaultTemplateContent(): Promise<void>;
    selectTemplateContent(index: number, confirmSwitch?: boolean): void;
    loadCategories(): Promise<void>;
    loadContentTypes(): void;
    onCategoryChange(value: string): Promise<void>;
    addNewTemplateContent(): Promise<void>;
    cancelNewTemplateContent(): void;
    deleteTemplateContent(index: number): Promise<void>;
    get currentTemplateContent(): TemplateContentEntity | null;
    get hasMultipleContents(): boolean;
    onContentTypeChange(): void;
    onContentChange(): void;
    /**
     * Updates the hasUnsavedChanges flag based on entity dirty states
     */
    private updateUnsavedChangesFlag;
    onTemplateTextChange(event: any): void;
    /**
     * Helper method to track setTimeout calls for cleanup
     */
    private setTrackedTimeout;
    /**
     * Manually sync the editor value without triggering change events
     */
    private syncEditorValue;
    saveTemplateContents(): Promise<boolean>;
    SaveRecord(StopEditModeAfterSave?: boolean): Promise<boolean>;
    getContentTypeDisplayText(typeId: string): string;
    getEditorLanguage(): string;
    private isDuplicateCategory;
    /**
     * Test run the current template using the parameter dialog
     */
    runTemplate(): Promise<void>;
    /**
     * Handle parameter dialog close
     */
    onParamDialogClose(): void;
    getContentTypeOptionsForContent(): Array<{
        text: string;
        value: string;
    }>;
    /**
     * Handles template content changes from the shared editor
     */
    onSharedTemplateContentChange(content: TemplateContentEntity[]): void;
    /**
     * Handles template run requests from the shared editor
     */
    onSharedTemplateRun(template: TemplateEntity): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<TemplatesFormExtendedComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TemplatesFormExtendedComponent, "mj-templates-form", never, {}, {}, never, never, false, never>;
}
export declare function LoadTemplatesFormExtendedComponent(): void;
//# sourceMappingURL=templates-form.component.d.ts.map