import { Point } from "@intelligentgraphics/ig.gfx.core";
import * as Core from "@intelligentgraphics/ig.gfx.core";
export declare type Association = {
    ownPointKey: string;
    otherId: string;
    otherPointKey: string;
};
export declare type AssociationType = "parent" | "children" | "neighbors";
export declare class AssociatesCache {
    private readonly api;
    private convertedPoints;
    /**
     * parent connection aka getParent()
     *
     * @private
     * @type {TypeSpecificAssociationCache}
     */
    private gfx2parent;
    /**
     * children aka getChildren()
     *
     * @private
     * @type {TypeSpecificAssociationCache}
     */
    private gfx2children;
    /**
     *  neighbors aka getNeighbor()
     *
     * @private
     * @type {TypeSpecificAssociationCache}
     */
    private gfx2neighbors;
    constructor(api: Core._API);
    invalidateRoot(rootId: string): void;
    getConvertedPoints(gfxId: string, wantedType: string): Point[];
    /**
     * set explicit Association
     *
     * @param {string} componentId
     * @param {string} foundParentId
     * @param {Association} association
     */
    setParent(componentId: string, foundParentId: string, association: Association): void;
    setNonParents(componentId: string, notParents: string[]): void;
    /**
     * Returns 1 parent association
     * or explicit "has no parent" i.e. null
     * or list of gfxids that have to be checked
     *
     * @param componentId
     */
    getParent(componentId: string): Association | null | string[];
    setChildren(componentId: string, associations: Association[]): void;
    setNonChildren(componentId: string, notChildren: string[]): void;
    getChildren(componentId: string): {
        knowns: Association[];
        unknowns: string[];
    };
    setNeighbors(componentId: string, associations: Association[]): void;
    setNonNeighbors(componentId: string, notNeighbors: string[]): void;
    getNeighbors(componentId: string): {
        knowns: Association[];
        unknowns: string[];
    };
    /**
     * after moving a gfxid, its respective associations are set from YES or NO to UNKNOWN
     *
     * @private
     * @param {string} gfxId
     * @param {(TypeSpecificAssociationCache | undefined)} typeCache
     * @returns
     */
    private invalidateCertainAssociation;
    /**
     * Enter a bunch of Associations for the given component
     * into the given cache
     *
     * @private
     * @param {TypeSpecificAssociationCache} multicache
     * @param {string} componentId
     * @param {Association[]} associations
     */
    private setMultiAssociation;
    /**
     * Enter a bunch of explicit "NOT-Associations" into given cache
     *
     * @param multiCache
     * @param componentId
     * @param notparents
     */
    private setMultiNotAssociations;
    /**
     * actually read the known associations and the gfxs whose state is unknown
     *
     * @private
     * @param {TypeSpecificAssociationCache} multicache
     * @param {string} componentId
     * @returns {{ knowns: Association[]; unknowns: string[] }}
     */
    private getMultiAssociations;
}
