import { PathArray } from "../config/types";
/**
 * This handles the initial mapping for us. It will crawl through all child objects and map them.
 * - Parent is the current location within the object(`parent.child`).
 * - Null is top level.
 *
 *  This method doesn't produce a mapping for the object passed in. Its use case is creating initial
 * mappings and the root of the store doesn't need one.
 *
 * The mapping is all flattened.
 */
export declare function initObject(object: object, parent: object | string | null, mapping: Record<string, object | string | null>): void;
/**
 * Generates a mapping string from a path array e.g. ["finsemble", "custom", "special.value", "subProperty"]
 *
 * The mapping string is used to map out a field that corresponds to an object so that we can trigger
 * listeners when a config value changes.
 *
 * This method tokenizes the . (dot) into $DOT" so that Finsemble is able to retrieve the right listener in the
 * event of a property containing a dot.
 *
 * @param pathArray
 * @returns a string object path with tokenized dots as $DOT$ - eg - finsemble.custom["special.field"].value = finsemble.custom.special$DOT$field.value
 */
export declare const generateMappingString: (pathArray: PathArray) => string;
/**
 * Will map out a field in an object. This will prevent us from looping through the whole store values every time
 * we have a change in one of its values.
 *
 * @param object The store object
 * @param pathToMap The path to map
 * @param mapping The object that holds the current mappings
 */
export declare const mapField: (object: object, pathToMap: PathArray, mapping: Record<string, object | string | null>) => void;
/**
 * Recursively computes the changes of an object property path given the current and new values.
 *
 * @param currentValue The current value in the store
 * @param newValue The new value in the store
 * @param path The path related to the value
 * @returns an array of strings with the changes paths
 */
export declare const computeChanges: (currentValue: any, newValue: any, path: PathArray) => string[];
/**
 * Determines what fields are being removed from the store by a particular change and
 * which mappings should therefore be removed. Removes all of the mappings that it returns.
 *
 * @param object The store object
 * @param field The field to check for
 * @param mapping The object that holds the current mappings
 * @returns an array with the removed mappings
 */
export declare const computeRemovals: (object: object, field: PathArray, mapping: Record<string, object | string | null>) => string[];
/**
 * Clones an object to ensure immutability
 *
 * @param value The value to maybe clone
 * @returns a clone of an object or the value itself
 */
export declare const maybeCloneValue: (value: any) => any;
/**
 * Removes the specified object key and value for a given array path.
 *
 * @param values The object to remove the value from
 * @param path The path array property to remove
 */
export declare const removeValue: (values: Record<string, any>, path: PathArray) => void;
//# sourceMappingURL=storeUtils.d.ts.map