/**
 * StringParser version 1.0.0
 * All string parsing function should be in this class
 * this simplifies keeping things alinged in the public and private repo.
 * ---
 * At some point this will become an npm library
 */
export type TPathStaticSegment<A extends string, Result = A> = A extends `{${string}` ? never : A extends `${string}.${string}` ? never : Result;
export type TPathVariableSegment<A extends string = `{${string}=${string}}`, Result = A> = A extends `{${string}=${string}}` ? Result : never;
export type TStringKeyValue = string;
export type TPathToVariable<A extends string> = A extends `{${infer Name}=${infer Value}}` ? {
    name: Name;
    value: Value;
} : never;
export type TVariableToPath<Variable extends TVariable> = `{${Variable['name']}=${Variable['value']}}`;
export type TVariable = {
    name: string;
    value: string;
};
export declare enum EPathToNodeRelation {
    shadow = "shadow",
    sibling = "sibling",
    parent = "parent",
    child = "child",
    unrelated = "unrelated",
    parentShadow = "parentShadow",
    self = "self"
}
export type TResolvedPathPart = {
    segmentPath: string;
    index: number;
    variable?: TVariable;
};
export type TGraphNode<T = unknown> = {
    inferredFrom: string;
    segmentPath: string;
    value?: T;
    children: TGraphNode<T>[];
};
export type TShadowNodeMap<T = unknown> = Record<string, Array<{
    resolvedPath: string;
    node: TGraphNode<T>;
}>>;
type TReduceGraphNodeResult<T, X> = {
    [K: string]: TReduceGraphNodeResult<T, X> | X;
};
declare class SfyrParser {
    readonly DEFAULT_FILE_SLUG = "default";
    readonly DEFAULT_STRING_SLUG = "default";
    readonly GRAPH_NODE_ROOT_SEGMENT_PATH = "__root";
    readonly ANY_SEGMENT = "___";
    constructor();
    readonly splitResolvedPath: (resolvedPath: string) => string[];
    readonly segmentToVariable: (part: string) => TVariable | undefined;
    readonly selectGraphPath: ({ path, node, }: {
        path: string;
        node: Record<string, any>;
    }) => any;
    readonly variablesFromPathToNode: (resolvedPath: string) => Record<string, string>;
    readonly segmentToPartialVariable: (part: string) => TVariable | null;
    readonly variableToSegment: (variable: TVariable) => string;
    readonly graphNodeHasChildren: (node: {
        children?: any[] | Record<string, any>;
    }) => boolean;
    readonly maybeJoinFirst: (joinChar: string, ...items: string[]) => string;
    readonly lastSegment: (resolvedPath: string) => string;
    readonly templateToPathToNode: (templatePath: string, variables: Record<string, string>) => string;
    readonly templateFromPathToNode: (resolvedPath: string) => string;
    readonly comparePathToNode: (p1: string, p2: string) => EPathToNodeRelation;
    readonly updatePathToNode: (oldPathToNode: string, newPathToNode: string, targets: string[]) => (string | null)[];
    readonly sameSegmentOrVariable: (seg1: string, seg2: string) => boolean;
    readonly parseResolvedPath: (resolvedPath: string) => TResolvedPathPart[];
    readonly reduceGraphNode: <T, X>({ nodes, nodeToSegment, nodeToChildren, nodeToValue, }: {
        nodes: T[];
        nodeToSegment: (s: T) => string;
        nodeToChildren: (s: T) => T[];
        nodeToValue: (s: T) => X;
    }) => TReduceGraphNodeResult<T, X>;
    readonly createGraphNodeRoot: <T>(children?: TGraphNode<T>[]) => TGraphNode<T>;
    readonly mergeInternalGraphNodesToCommonRoot: <T>(values: Record<string, T>) => TGraphNode<T>;
    readonly makeInternalGraphNode: <T>(resolvedPath: string, value: T) => TGraphNode<T>;
    readonly mergeInternalGraphNodes: <T>(_a: TGraphNode<T>, _b: TGraphNode<T>) => TGraphNode<T>[];
    readonly graphNodeToVariables: <T>(node: TGraphNode<T>) => Record<string, Record<string, string>>;
    readonly flattenToValues: <T>(node: TGraphNode<T>) => T[];
    readonly resolveFromPathToNode: <T, R>(params: {
        nodes: Record<string, T>;
        nodeToValue: (t: TGraphNode<T>) => R;
    }) => TReduceGraphNodeResult<TGraphNode<T>, R>;
    readonly shadowSegmentFromSegment: (segment: string) => string;
    readonly shadowPathFromResolvedPath: (resolvedPath: string) => string;
    readonly buildShadowMap: (node: TGraphNode, nodeResolvedPath?: string, parentShadowPath?: string, shadowMap?: TShadowNodeMap<unknown>) => TShadowNodeMap;
    readonly resetGraphNode: <T = unknown>(graphNode: TGraphNode) => TGraphNode<T>;
}
export declare const Sfyr: SfyrParser;
export {};
