import { OnInit, OnDestroy, ChangeDetectorRef, AfterViewInit } from '@angular/core';
import { QueryEntity, QueryParameterEntity, QueryCategoryEntity, QueryFieldEntity, QueryEntityEntity, QueryPermissionEntity } from '@memberjunction/core-entities';
import { QueryFormComponent } from '../../generated/Entities/Query/query.form.component';
import { CodeEditorComponent } from '@memberjunction/ng-code-editor';
import * as i0 from "@angular/core";
interface CategoryTreeNode {
    id: string;
    name: string;
    items?: CategoryTreeNode[];
}
export declare class QueryFormExtendedComponent extends QueryFormComponent implements OnInit, OnDestroy, AfterViewInit {
    cdr: ChangeDetectorRef;
    record: QueryEntity;
    queryParameters: QueryParameterEntity[];
    queryFields: QueryFieldEntity[];
    queryEntities: QueryEntityEntity[];
    queryPermissions: QueryPermissionEntity[];
    isLoadingParameters: boolean;
    isLoadingFields: boolean;
    isLoadingEntities: boolean;
    isLoadingPermissions: boolean;
    hasUnsavedChanges: boolean;
    showFiltersHelp: boolean;
    showRunDialog: boolean;
    showCategoryDialog: boolean;
    sqlPanelExpanded: boolean;
    parametersPanelExpanded: boolean;
    fieldsPanelExpanded: boolean;
    entitiesPanelExpanded: boolean;
    detailsPanelExpanded: boolean;
    permissionsPanelExpanded: boolean;
    categoryOptions: Array<{
        text: string;
        value: string;
    }>;
    categories: QueryCategoryEntity[];
    categoryTreeData: CategoryTreeNode[];
    statusOptions: {
        text: string;
        value: string;
    }[];
    sqlEditor: CodeEditorComponent | null;
    sqlFilters: import("@memberjunction/core").RunQuerySQLFilter[];
    private destroy$;
    private isUpdatingEditorValue;
    ngOnInit(): Promise<void>;
    ngOnDestroy(): void;
    ngAfterViewInit(): void;
    EndEditMode(): void;
    StartEditMode(): void;
    CancelEdit(): void;
    private updateEditorValue;
    isFormReadOnly(): boolean;
    loadQueryParameters(): Promise<void>;
    loadQueryFields(): Promise<void>;
    loadQueryEntities(): Promise<void>;
    loadQueryPermissions(): Promise<void>;
    loadCategories(): Promise<void>;
    private buildCategoryTree;
    getCategoryPath(): string;
    onCategoryChange(value: string): Promise<void>;
    private isDuplicateCategory;
    /**
     * Updates the hasUnsavedChanges flag based on entity dirty states
     */
    private updateUnsavedChangesFlag;
    toggleFiltersHelp(): void;
    /**
     * Run the query with parameter dialog
     */
    runQuery(): Promise<void>;
    /**
     * Handle run dialog close
     */
    onRunDialogClose(): void;
    /**
     * Add a new parameter
     */
    addParameter(): Promise<void>;
    /**
     * Edit a parameter
     */
    editParameter(param: QueryParameterEntity): Promise<void>;
    /**
     * Delete a parameter
     */
    deleteParameter(param: QueryParameterEntity): Promise<void>;
    /**
     * Handle category creation from dialog
     */
    onCategoryCreated(newCategory: QueryCategoryEntity): Promise<void>;
    /**
     * Format date for display
     */
    formatDate(date: Date | string | null): string;
    SaveRecord(StopEditModeAfterSave?: boolean): Promise<boolean>;
    getStatusBadgeColor(): string;
    /**
     * Handle SQL value changes from the code editor
     */
    onSQLChange(value: any): void;
    /**
     * Add a new field
     */
    addField(): Promise<void>;
    /**
     * Delete a field
     */
    deleteField(field: QueryFieldEntity): Promise<void>;
    /**
     * Add a new entity
     */
    addEntity(): Promise<void>;
    /**
     * Delete an entity
     */
    deleteEntity(entity: QueryEntityEntity): Promise<void>;
    /**
     * Get entity options for dropdown
     */
    getEntityOptions(): Array<{
        text: string;
        id: string;
    }>;
    /**
     * Get the grid edit mode based on component edit mode
     */
    GridEditMode(): "None" | "Save" | "Queue";
    static ɵfac: i0.ɵɵFactoryDeclaration<QueryFormExtendedComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<QueryFormExtendedComponent, "mj-query-form", never, {}, {}, never, never, false, never>;
}
export declare function LoadQueryFormExtendedComponent(): void;
export {};
//# sourceMappingURL=query-form.component.d.ts.map