import type { EdgeConstraint, EdgeConstraintItem } from '../types';
/**
 * Parse edge constraints into internal representation
 *
 * @param constraints edge constraints to parse
 */
export declare function parseConstraints(constraints: EdgeConstraint[]): EdgeConstraintItem[];
/**
 * Parse internal edge constraint items to external representation
 *
 * @param constraintItems edge constraint items to parse
 */
export declare function parseConstraintItems(constraintItems: EdgeConstraintItem[]): EdgeConstraint[];
interface EdgeConstraintEncoderApi {
    /**
     * Add a new constraint
     */
    addConstraint: (source?: string, target?: string) => void;
    /**
     * Current constraints
     */
    constraints: EdgeConstraintItem[];
    /**
     * Remove a constraint with the given id
     */
    removeConstraint: (id: string) => void;
    /**
     * Reverse a given constraint - switch source and target
     */
    reverseConstraint: (edgeConstraint: EdgeConstraintItem) => void;
    /**
     * Update given constraint
     */
    updateConstraint: (edgeConstraint: EdgeConstraintItem) => void;
}
/**
 * Hook exposing common logic to manage edge constraints
 * Can be re-used with different frontends to maintain the same functionality
 *
 * @param initialConstraints Initial constraints to show
 * @param onUpdate Handler called whenever constraints are updated
 */
export declare function useEdgeConstraintEncoder(initialConstraints: EdgeConstraint[], onUpdate?: (constraints: EdgeConstraint[]) => void | Promise<void>): EdgeConstraintEncoderApi;
export {};
//# sourceMappingURL=use-edge-encoder.d.ts.map