import { PersistedConfigWithShaders } from './../../../nodes/utils/BasePersistedConfig';
import { Number2, PolyDictionary } from '../../../../types/GlobalTypes';
import { TypedNode } from '../../../nodes/_Base';
import { NodeContext } from '../../../poly/NodeContext';
import type { JsonExportDispatcher } from './Dispatcher';
import { ParamJsonExporterData } from '../../../nodes/utils/io/IOController';
import { ParamType } from '../../../poly/ParamType';
import { BaseConnectionPointData } from '../../../nodes/utils/io/connections/_Base';
interface NamedInputData {
    index?: number;
    inputName?: string;
    node: string;
    output: string;
}
type IndexedInputData = string | null;
export type InputData = NamedInputData | IndexedInputData;
interface FlagsData {
    bypass?: boolean;
    display?: boolean;
    optimize?: boolean;
}
export interface IoConnectionPointsData {
    in?: BaseConnectionPointData[];
    out?: BaseConnectionPointData[];
}
export interface NodeJsonExporterData {
    type: string;
    nodes?: PolyDictionary<NodeJsonExporterData>;
    children_context?: NodeContext;
    params?: PolyDictionary<ParamJsonExporterData<ParamType>>;
    maxInputsCount?: number;
    inputs?: InputData[];
    connection_points?: IoConnectionPointsData;
    flags?: FlagsData;
    cloned_state_overriden?: boolean;
    persisted_config?: PersistedConfigWithShaders;
    polyNode?: {
        locked: boolean;
    };
}
export interface NodeJsonExporterUIData {
    pos?: Number2;
    comment?: string;
    selection?: string[];
    nodes?: PolyDictionary<NodeJsonExporterUIData>;
}
export type NodeJSONShadersData = PolyDictionary<PolyDictionary<string>>;
export type NodeJSONFunctionBodiesData = PolyDictionary<string | PolyDictionary<string>>;
type BaseNodeTypeWithIO = TypedNode<NodeContext, any>;
export interface JSONExporterDataRequestOption {
    showPolyNodesData?: boolean;
    withPersistedConfig?: boolean;
}
export declare class NodeJsonExporter<T extends BaseNodeTypeWithIO> {
    protected _node: T;
    protected dispatcher: JsonExportDispatcher;
    private _data;
    constructor(_node: T, dispatcher: JsonExportDispatcher);
    data(options: JSONExporterDataRequestOption): Promise<NodeJsonExporterData>;
    uiData(options: JSONExporterDataRequestOption): NodeJsonExporterUIData;
    protected ui_data_without_children(): NodeJsonExporterUIData;
    persistedConfigData(shadersData: NodeJSONShadersData, jsFunctionBodiesData: NodeJSONFunctionBodiesData, options: JSONExporterDataRequestOption): Promise<void>;
    private _isRoot;
    protected inputs_data(): InputData[];
    protected connection_points_data(): IoConnectionPointsData | undefined;
    protected params_data(): PolyDictionary<ParamJsonExporterData<ParamType>>;
    protected nodes_data(options: JSONExporterDataRequestOption): Promise<PolyDictionary<NodeJsonExporterData>>;
    protected add_custom(): void;
}
export {};
