import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
import { EntityMapRow } from '../../services/integration-data.service';
import { IRunViewProvider } from '@memberjunction/core';
import * as i0 from "@angular/core";
type TransformType = 'direct' | 'regex' | 'split' | 'combine' | 'lookup' | 'format' | 'coerce' | 'substring' | 'custom';
interface TransformStepUI {
    Type: TransformType;
    Config: Record<string, unknown>;
    OnError: 'Skip' | 'Null' | 'Fail';
}
interface VisualSourceField {
    Name: string;
    Label: string;
    Type: string;
    IsRequired: boolean;
    IsPrimaryKey: boolean;
}
interface VisualDestField {
    Name: string;
    Type: string;
    IsRequired: boolean;
}
interface VisualConnection {
    ID: string | null;
    SourceFieldName: string;
    DestFieldName: string;
    IsKeyField: boolean;
    IsRequired: boolean;
    Direction: 'SourceToDest' | 'DestToSource' | 'Both';
    TransformSteps: TransformStepUI[];
    IsDirty: boolean;
    IsNew: boolean;
    MarkedForDelete: boolean;
}
export declare class VisualFieldEditorComponent implements OnChanges {
    EntityMap: EntityMapRow | null;
    CompanyIntegrationID: string | null;
    RunViewProvider: IRunViewProvider | null;
    Close: EventEmitter<void>;
    EditorSourceFields: VisualSourceField[];
    EditorDestFields: VisualDestField[];
    EditorConnections: VisualConnection[];
    EditorLoading: boolean;
    EditorSaving: boolean;
    EditorSaveSuccess: boolean;
    SelectedConnectionIdx: number | null;
    ConnectingFromSource: string | null;
    EditorSearchSource: string;
    EditorSearchDest: string;
    ShowSourcePreview: boolean;
    ShowDestPreview: boolean;
    PreviewSourceLoading: boolean;
    PreviewDestLoading: boolean;
    PreviewSourceRows: Array<Record<string, string | number | boolean | null>>;
    PreviewDestRows: Array<Record<string, string | number | boolean | null>>;
    PreviewSourceColumns: string[];
    PreviewDestColumns: string[];
    FieldMapsExpanded: boolean;
    InfoPanelExpanded: boolean;
    InfoPanelLoading: boolean;
    InfoDestRecordCount: number | null;
    InfoLastSync: {
        StartedAt: string | null;
        EndedAt: string | null;
        Status: string;
        TotalRecords: number;
    } | null;
    readonly FIELD_HEIGHT = 40;
    readonly SVG_WIDTH = 200;
    readonly TRANSFORM_TYPES: Array<{
        Value: TransformType;
        Label: string;
        Icon: string;
    }>;
    private dataService;
    private cdr;
    ngOnChanges(changes: SimpleChanges): void;
    private openEditor;
    OnClose(): void;
    OnToggleEditorSyncEnabled(event: Event): Promise<void>;
    LoadVisualEditorData(): Promise<void>;
    get FilteredEditorSourceFields(): VisualSourceField[];
    get FilteredEditorDestFields(): VisualDestField[];
    get VisibleConnections(): VisualConnection[];
    get EditorCanvasHeight(): number;
    GetConnectionPath(conn: VisualConnection): string;
    GetConnectionMidY(conn: VisualConnection): number;
    GetConnectionLineClass(conn: VisualConnection): string;
    GetConnectionBadgeClass(conn: VisualConnection): string;
    GetConnectionTransformIcon(conn: VisualConnection): string;
    GetConnectionDirectionIcon(conn: VisualConnection): string;
    GetTransformTypeLabel(type: TransformType): string;
    IsSourceFieldMapped(fieldName: string): boolean;
    IsDestFieldMapped(fieldName: string): boolean;
    OnEditorSourceClick(fieldName: string): void;
    OnEditorDestClick(fieldName: string): void;
    CancelConnect(): void;
    SelectConnection(index: number, event: Event): void;
    DeselectConnection(): void;
    get SelectedConnection(): VisualConnection | null;
    RemoveSelectedConnection(): void;
    ToggleConnectionKey(): void;
    ToggleConnectionRequired(): void;
    GetDirectionArrowClass(direction: string): string;
    OnConnectionDirectionChange(direction: 'SourceToDest' | 'DestToSource' | 'Both'): void;
    OnConnectionTransformChange(stepIndex: number, type: TransformType): void;
    OnTransformConfigChange(conn: VisualConnection, stepIndex: number, key: string, value: string): void;
    AddTransformStep(): void;
    RemoveTransformStep(stepIndex: number): void;
    ToggleSourcePreview(): Promise<void>;
    ToggleDestPreview(): Promise<void>;
    private loadSourcePreview;
    private loadDestPreview;
    ToggleFieldMaps(): void;
    ToggleInfoPanel(): void;
    private loadInfoPanelData;
    FormatSyncDate(dateStr: string | null): string;
    SyncStatusClass(status: string): string;
    get HasEditorChanges(): boolean;
    SaveVisualEditor(): Promise<void>;
    AutoMapEditorFields(): Promise<void>;
    get EditorMappedCount(): number;
    get EditorKeyFieldCount(): number;
    get EditorRequiredCount(): number;
    GetConfigKeys(step: TransformStepUI): string[];
    GetConfigValue(step: TransformStepUI, key: string): string;
    private getSourceFieldIndex;
    private getDestFieldIndex;
    private getSourceFieldY;
    private getDestFieldY;
    private getPrimaryTransformType;
    private parseTransformPipeline;
    private serializeTransformPipeline;
    private getDefaultConfigForType;
    private resolveSourceFieldsFromMetadata;
    static ɵfac: i0.ɵɵFactoryDeclaration<VisualFieldEditorComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<VisualFieldEditorComponent, "app-visual-field-editor", never, { "EntityMap": { "alias": "EntityMap"; "required": false; }; "CompanyIntegrationID": { "alias": "CompanyIntegrationID"; "required": false; }; "RunViewProvider": { "alias": "RunViewProvider"; "required": false; }; }, { "Close": "Close"; }, never, never, false, never>;
}
export declare function LoadVisualFieldEditorComponent(): void;
export {};
//# sourceMappingURL=visual-editor.component.d.ts.map