import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
import { DialogRef } from '@progress/kendo-angular-dialog';
import { Subject, BehaviorSubject } from 'rxjs';
import { FormControl } from '@angular/forms';
import { MJTemplateEntity, MJTemplateCategoryEntity } from '@memberjunction/core-entities';
import * as i0 from "@angular/core";
export interface TemplateSelectorConfig {
    /** Title for the dialog */
    title: string;
    /** Whether to show the "Create New" option */
    showCreateNew?: boolean;
    /** Filter criteria for templates */
    extraFilter?: string;
    /** Allow multiple selection */
    multiSelect?: boolean;
    /** Pre-selected template IDs */
    selectedTemplateIds?: string[];
    /** Show only active templates */
    showActiveOnly?: boolean;
}
export interface TemplateSelectorResult {
    /** Selected templates */
    selectedTemplates: MJTemplateEntity[];
    /** Whether user chose to create new */
    createNew?: boolean;
}
/**
 * Template selector dialog that allows users to search and select from existing templates.
 * This dialog provides a searchable interface with category filtering and template preview.
 */
export declare class TemplateSelectorDialogComponent implements OnInit, OnDestroy {
    private dialogRef;
    private cdr;
    config: TemplateSelectorConfig;
    private destroy$;
    result: Subject<TemplateSelectorResult | null>;
    isLoading$: BehaviorSubject<boolean>;
    templates$: BehaviorSubject<MJTemplateEntity[]>;
    filteredTemplates$: BehaviorSubject<MJTemplateEntity[]>;
    categories$: BehaviorSubject<MJTemplateCategoryEntity[]>;
    searchControl: FormControl<string | null>;
    selectedCategory: string | null;
    selectedTemplates: Set<string>;
    viewMode: 'grid' | 'list';
    constructor(dialogRef: DialogRef, cdr: ChangeDetectorRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    private setupSearch;
    private loadData;
    private loadTemplates;
    private loadCategories;
    private filterTemplates;
    onCategoryChange(categoryId: string | null): void;
    getCategoryDisplayName(categoryId: string): string;
    toggleTemplateSelection(template: MJTemplateEntity): void;
    isTemplateSelected(template: MJTemplateEntity): boolean;
    getSelectedTemplateObjects(): MJTemplateEntity[];
    toggleViewMode(): void;
    getTemplateStatusColor(template: MJTemplateEntity): string;
    getTemplateStatusText(template: MJTemplateEntity): string;
    getTemplatePreview(template: MJTemplateEntity): string;
    formatDate(date: Date | string | null): string;
    selectTemplates(): void;
    createNew(): void;
    cancel(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<TemplateSelectorDialogComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TemplateSelectorDialogComponent, "mj-template-selector-dialog", never, {}, {}, never, never, true, never>;
}
//# sourceMappingURL=template-selector-dialog.component.d.ts.map