import { type RecoilState, type Snapshot } from 'recoil';
import { type DerivedVariable } from '../../types';
import { type TriggerIndexValue } from './store';
/**
 * Information about a trigger in the variable tree
 */
export interface TriggerInfo {
    /** Path to the variable that owns this trigger */
    path: string[];
    /** The variable that owns this trigger */
    variable: DerivedVariable;
}
/**
 * Get a trigger index for a variable from the atom registry, registering it if not already registered
 *
 * @param variable variable to register trigger for
 */
export declare function getOrRegisterTrigger(variable: DerivedVariable): RecoilState<TriggerIndexValue>;
/**
 * Resolve current trigger index value for a variable from the atom registry.
 * If the atom is not registered, returns default values.
 */
export declare function resolveTriggerStatic(triggerAtom: RecoilState<TriggerIndexValue> | null, snapshot: Snapshot): TriggerIndexValue;
/**
 * Built a flat list of triggers, preserving information about the position of each trigger in the variable tree
 *
 * @param variables Array of variables to analyze
 * @returns list of triggers, with information about the variable that owns each trigger
 */
export declare function buildTriggerList(variables: any[]): Array<TriggerInfo>;
/**
 * Recursively register triggers in the list of dependant variables using a pre-built trigger list
 *
 * @param triggerList flat list of triggers to register
 * @param registerFunc register function to run
 * @param triggerMap optional pre-built trigger map for efficiency
 */
export declare function registerChildTriggers(triggerList: Array<TriggerInfo>, registerFunc: (state: RecoilState<any>) => TriggerIndexValue): Array<TriggerIndexValue>;
//# sourceMappingURL=triggers.d.ts.map